git svn for beginners

Git-svn for Beginners Cheat Sheet by EzequielMuns (ezk) via cheatography.com/2595/cs/799/ Setting up a git svn working ...

0 downloads 103 Views 33KB Size
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

Updating from and committing to svn

Checkout standard

git svn clone -s svn-url local -

repository

dir

Reflect & track remote

git svn show-ignore >

Move to a branch

git checkout branch

ignores

.gitignore

Create and move to new

git checkout -b new-b

Reflect remote

git svn show-ignore >> .git/i

branch

ranch [old-branch]

ignores

nfo/exclude

List local branches

git branch

List local and remote

git branch -a

git branch new-b ranch [old-branch]

Normal git workflow Add file/stage changes (recur

Create new branch

Apply remote changes to local repo

git svn rebase

Commit changes back to

git svn

Subversion

dcommit

(svn) branches git add file

sive)

Merging a branch to

git merge other -br anch

current branch

Remove file

git rm [-r] file

Merge a branch as

git merge --squash other -

Interactively stage changes

git add -i

single commit

br anch

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

Cheatographer

Cheat Sheet

Sponsor

EzequielMuns (ezk)

This cheat sheet was published on 22nd January,

FeedbackFair, increase your conversion rate today!

cheatography.com/ezk/

2013 and was last updated on 28th February, 2013.

Try it free! http://www.FeedbackFair.com