Install make on OSX, and svn2git

Want to know how to quickly and easily install make on OSX?  Thank you, Stack Overflow!  Download Xcode, then under Preferences -->Downloads, install the "Command Line Tools".

Want to know how to take a subversion repository and use all the glory of GitHub?  Thank you, Emmanuel Bernard!  (Note, there might be a typo in his post; the directory on mine was /opt/local/libexec/git-core)

Want to know how to use svn2git?  Thanks, GitHub!
First, make sure you're in the directory where you want the git repo files to be created, then execute:
svn2git http://svn.example.com/path/to/repo
 

Want to know how to push the above translated svn2git onto GitHub?  We'll do that next, but first we need to know how to keep this Git "clone of our svn repo" up to date.  Do this:
svn2git --rebase

Now, want to know how to push your local git repo onto GitHub?  (by GitHub, I mean the web based tools.  Hopefully I got the terminology right!)
First, cd into the the local git repo.  Then, execute these two commands:
git remote add origin https://github.com/mygithubusername/myproject.git
git push -u origin master 

For some reason, it creates an extra project folder for me.  i.e. it creates https://github.com/slb534/myproject/myproject,  where the first "myproject" is totally empty except for another folder of the same name, and all the files are under that.

But this will have to do for now!  I'm lucky I can sync my stuff from SVN into Git and then push everything up onto GitHub!

With this being GitHub, somebody might send you a pull request and provide you with sweet updated code.  So you can pull that in.  But now how do you update your local svn2git?  Just pull it again:
git pull https://github.com/yourSvnClone master
 

No comments:

Post a Comment

Translate