You are on page 1of 1

Git-svn for Beginners Cheat Sheet

by EzequielMuns (ezk) via cheatography.com/2595/cs/799/

Setting up a git svn working copy

Working with branches

Checkout standard

git svn clone -s svn-url

repository

local-dir

Reflect & track

git svn show-ignore >

Move to a branch

git checkout branch

remote ignores

.gitignore

Create and move to

git checkout -b new-

Reflect remote

git svn show-ignore >>

new branch

branch [old-branch]

ignores

.git/info/exclude

List local branches

git branch

List local and remote

git branch -a

git branch new-branch


[old-branch]

Normal git workflow


Add file/stage changes

Create new branch

(svn) branches
git add file

(recursive)

Merging a branch to

git merge other-branch

current branch

Remove file

git rm [-r] file

Merge a branch as

git merge --squash

Interactively stage changes

git add -i

single commit

other-branch

Revert unstaged changes

git checkout file

Revert staged changes

git reset HEAD


file

Commit staged changes

git commit

Add and commit all changes

git commit -a

Updating from and committing to svn


Apply remote changes to local

git svn

repo

rebase

Commit changes back to

git svn

Subversion

dcommit

By EzequielMuns (ezk)

Published 22nd January, 2013.

Sponsored by Readability-Score.com

cheatography.com/ezk/

Last updated 28th February, 2013.

Measure your website readability!

Page 1 of 1.

https://readability-score.com

You might also like