Your SlideShare is downloading. ×
Getting started with git svn
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Getting started with git svn

290
views

Published on

Getting started with git svn

Getting started with git svn


0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
290
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
6
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Getting started with gitsvn Manij Shrestha
  • 2. Who? ● Git user who needs to work on project that uses SVN ● SVN users who wants to learn Git ● Because you can
  • 3. Why? ● Able to work on multiple branches from same project directory. ● No need to be on VPN to pull the revision history. ● Local branches, Stashing, local commits
  • 4. How? $ git svn clone svn://internal-repo/Project Project -s (-s == Standard model, trunk, branches, tags) OR $ git svn clone svn://internal-repo/Project Project --trunk=trunk --branches=maintenance/* --prefix=git-svn/ prefix must trail with “/” OR $ git svn init svn://internal-repo/Project Project --trunk=trunk --branches=maintenance/* --prefix=git-svn/ $ git svn fetch
  • 5. Taking a look @ .git/config SVN SVN: GIT:
  • 6. Pulling selective branch. If you only want to pull few branches. Edit “.git/config” Add branch name(s), inside “{}” $ git svn fetch SVN
  • 7. Getting Latest Code $ git svn rebase Not “git pull”
  • 8. commit $ git svn rebase (similar to ‘git pull’/ ‘svn update’, will rewind your changes and applies your changes on top) $ git svn dcommit SVN Each “git commit” will be checked in as separate revision in SVN.
  • 9. Working on branch $ git checkout -b branch2 refs/remotes/git-svn/branch2 Don’t forget the refs/ You can now commit and dcommit on this branch ● Merge is not recommended (Tree conflicts, commit to wrong branch). Merge branches in SVN.
  • 10. Linear history Always have a linear history. SVN GIT LOST
  • 11. Summary git svn init review .git/config git svn fetch git commit.. commit.. commit.. git svn rebase git svn dcommit git stash… git branch.. Linear History...