Friday, December 6, 2013

Useful Git and GitHub Commands

My notebook for Git/GitHub commands that I find useful.

To change where your local repo thinks it originally cloned itself from drop onto a command line in the appropriate directory and:
> git remote set-url origin<new location>
This is useful when working with a forked repo that you want to keep up-to-date with the original repo while you're working on the fork. Allows you to flip between both of them and keep changes from both current.
Follow the above command with a 
> git pull
to update from the <new location>

No comments:

Post a Comment