Cheatography
https://cheatography.com
The basic use cases for interacting with svn using git. (Based on http://viget.com/extend/effectively-using-git-with-subversion )
Setting up a git svn working copyCheckout standard repository | git svn clone -s svn-url local-dir | Reflect & track remote ignores | git svn show-ignore > .gitignore | Reflect remote ignores | git svn show-ignore >> .git/info/exclude |
Normal git workflowAdd file/stage changes (recursive) | git add file | Remove file | git rm [-r] file | Interactively stage changes | git add -i | 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 |
| | Working with branchesCreate new branch | git branch new-branch [old-branch] | Move to a branch | git checkout branch | Create and move to new branch | git checkout -b new-branch [old-branch] | List local branches | git branch | List local and remote (svn) branches | git branch -a | Merging a branch to current branch | git merge other-branch | Merge a branch as single commit | git merge --squash other-branch |
| | Updating from and committing to svnApply remote changes to local repo | git svn rebase | Commit changes back to Subversion | git svn dcommit |
|
Created By
Metadata
Favourited By
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets