Tuesday, September 1, 2009

Git: creating, pushing & deleting remote branches

I work on multiple machines. Need temporary remote branches that I can sync them with.

# create remote branch from a local branch
git push origin LOCAL_BRANCH:refs/heads/REMOTE_BRANCH

# push commits to remote branch
git push origin LOCAL_BRANCH:REMOTE_BRANCH

# pull commits from remote brance
git pull origin REMOTE_BRANCH

# delete remote branch
git push origin :REMOTE_BRANCH

No comments:

Blog Archive