
Untitled
By: a guest on
Jul 4th, 2012 | syntax:
None | size: 1.00 KB | hits: 11 | expires: Never
git usage with remote 'origin' repository
git branch somenewbranch
git checkout somenewbranch
... work work work ...
git add [changed files]
git commit
git checkout master
git merge somenewbranch
git branch -d somenewbranch
git push origin master:blahblah # This won't let me push to master branch
ssh origin
cd repodir
git merge blahblah
git branch -d blahblah
logout
git status # this shows me I'm still ahead
git pull origin # to bring them back in sync
git remote show origin # shows I have a stale blahblah branch
git remote prune origin # cleans that up
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: error: is denied, because it will make the index and work tree inconsistent
remote: error: with what you pushed, and will require 'git reset --hard' to match
remote: error: the work tree to HEAD.