Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 4th, 2012  |  syntax: None  |  size: 1.00 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. git usage with remote 'origin' repository
  2. git branch somenewbranch
  3. git checkout somenewbranch
  4. ... work work work ...
  5. git add [changed files]
  6. git commit
  7. git checkout master
  8. git merge somenewbranch
  9. git branch -d somenewbranch
  10.        
  11. git push origin master:blahblah         # This won't let me push to master branch
  12. ssh origin
  13. cd repodir
  14. git merge blahblah
  15. git branch -d blahblah
  16. logout
  17. git status                              # this shows me I'm still ahead
  18. git pull origin                         # to bring them back in sync
  19. git remote show origin                  # shows I have a stale blahblah branch
  20. git remote prune origin                 # cleans that up
  21.        
  22. remote: error: refusing to update checked out branch: refs/heads/master
  23. remote: error: By default, updating the current branch in a non-bare repository
  24. remote: error: is denied, because it will make the index and work tree inconsistent
  25. remote: error: with what you pushed, and will require 'git reset --hard' to match
  26. remote: error: the work tree to HEAD.