Created
October 15, 2012 22:19
-
-
Save markahesketh/3895994 to your computer and use it in GitHub Desktop.
GIT SVN Workflow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## CLONE THE SVN | |
git svn clone -s <repo-url> Repository | |
## CREATING THE BRANCH REMOTELY AND LOCALLY | |
# Create the branch on the remote | |
git svn branch -m "BRANCH: Create DEV-branch_name - Description of branch" DEV-branch_name | |
# Create the branch locally | |
git checkout --track -b DEV-branch_name remotes/DEV-branch_name | |
## WORKING IN THE BRANCH | |
# Change files, commit changes | |
git add <file> | |
git commit -m "Commit message." | |
## UPDATE REMOTE BRANCH | |
git svn rebase # Pull any updates from remote | |
git svn dcommit --dry-run # Check its committing to remote branch | |
git svn dcommit | |
## UPDATE THE TRUNK | |
# Update master (local Subversion tracking branch) with any changes from Subversion | |
git checkout master | |
git svn rebase # Pull any updates from trunk before merging | |
# Merge changes from DEV-branch_name to local Master | |
git merge --squash DEV-branch_name | |
git add <files> | |
git commit -m "MERGE from DEV-branch_name" | |
# Push to remote master | |
git svn dcommit --dry-run # Check its committing to trunk | |
git svn dcommit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment