Thursday, October 21, 2010

Updating Local repos from Github

I had Steven contribute a web interface to my C3DL build bot the other day, so I had to get my git to update to the new changes on Github.

I'll make this a short post, I had a bit of trouble getting my local repo to update.

I tried using
- git fetch - This basically just ran but I saw no results, and nothing actually changed so not totally sure what happened.
- git push - This gave me an error message when I tried running it just like so:

So, finally I figured out my dilemma, if you've only created one repo it *should* be named "origin". To be sure use the command
git remote -v - This will give you a listing of all the current remote repos stored by Git, and their symbolic names in the first column that you can use.

So in my case by updating my push command, it ended up becoming
git pull origin master - Which to decipher means, I'm pulling from my origin remote repo and merging it with my local master branch, if you're using multiple branches here is where you would change master to whichever branch you're working on.

So much for short post ufta.

No comments:

Post a Comment