Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Intro to git-svn

andylind
September 06, 2013

Intro to git-svn

This is an intro presentation on using Git. The focus is on using Git to connect to a subversion repository to share changes via git-svn.

andylind

September 06, 2013
Tweet

More Decks by andylind

Other Decks in Programming

Transcript

  1. • Frictionless Context Switching • Role-Based Code lines • Feature

    Based Workflow • Disposable Experimentation
  2. Git-svn is a feature that ships with Git that allows

    Git to connect to a subversion repository and share changes. Using git-svn is one way to learn how to use Git while still maintaining a Subversion repository.
  3. Basic Commands #add contents to the next commit git add

    #show the working tree status git status #record changes to the repository git commit #show commit log git log
  4. A Simple Example #pull recent changes from svn git svn

    rebase #add a file touch my-file.txt #add changes to staging area git add my-file.txt #commit staged changes git commit -m "made some changes“ #share changes with svn git svn dcommit
  5. Sharing Changes w/ Subversion #get updates from svn git svn

    rebase #commit all local git commits to svn git svn dcommit
  6. Sharing Changes #get new changes from external repository git fetch

    #fetch + merge git pull #write new changes to external repository git push
  7. Branching #create/modify/delete branches git branch #switch working dir to another

    branch/commit git checkout #merge two or more branches git merge #changes starting point of a branch git rebase #set a branch back to HEAD git reset
  8. Git svn Workflow #work on a local branch or branches

    git checkout -b myfeature #make some changes and commit git commit -a -m "made some changes“ #switch to master and rebase changes git checkout master git rebase myfeature git svn rebase #commit changes to svn git svn dcommit