SHARE
TWEET

Git failed

chusiang Mar 6th, 2012 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $ git push
  2. To jonny@egw:radtek.git
  3.  ! [rejected]        master -> master (non-fast-forward)
  4. error: failed to push some refs to 'jonny@egw:radtek.git'
  5. To prevent you from losing history, non-fast-forward updates were rejected
  6. Merge the remote changes (e.g. 'git pull') before pushing again.  See the
  7. 'Note about fast-forwards' section of 'git push --help' for details.
  8.  
  9. $ git pull
  10. You asked me to pull without telling me which branch you
  11. want to merge with, and 'branch.master.merge' in
  12. your configuration file does not tell me, either. Please
  13. specify which branch you want to use on the command line and
  14. try again (e.g. 'git pull <repository> <refspec>').
  15. See git-pull(1) for details.
  16.  
  17. If you often merge with the same branch, you may want to
  18. use something like the following in your configuration file:
  19.     [branch "master"]
  20.     remote = <nickname>
  21.     merge = <remote-ref>
  22.  
  23.     [remote "<nickname>"]
  24.     url = <url>
  25.     fetch = <refspec>
  26.  
  27. See git-config(1) for details.
  28.  
  29. -- solution by zeroplex --
  30.  
  31. $ git pull origin master:tmp
  32. From egw:radtek
  33.  * [new branch]      master     -> tmp
  34. Merge made by the 'recursive' strategy.
  35.  src/bash/ins/db-check-ins113.sh |   21 +++++++++++++++++++++
  36.  1 files changed, 21 insertions(+), 0 deletions(-)
  37.  create mode 100755 src/bash/ins/db-check-ins113.sh
  38.  
  39. $ git checkout master
  40. M       README
  41. Already on 'master'
  42.  
  43. $ git merge tmp
  44. Already up-to-date.
  45.  
  46. $ git branch -D tmp
  47. Deleted branch tmp (was b2e66be).
  48.  
  49. $ git push orig
  50. fatal: 'orig' does not appear to be a git repository
  51. fatal: The remote end hung up unexpectedly
  52.  
  53. $ git push origin
  54. Counting objects: 21, done.
  55. Delta compression using up to 4 threads.
  56. Compressing objects: 100% (14/14), done.
  57. Writing objects: 100% (14/14), 1.44 KiB, done.
  58. Total 14 (delta 9), reused 0 (delta 0)
  59. To jonny@egw:radtek.git
  60.    b2e66be..b166790  master -> master
  61.  
  62. -- solution by chusiang --
  63.  
  64. $ git status
  65. # On branch master
  66. # Changes not staged for commit:
  67. #   (use "git add <file>..." to update what will be committed)
  68. #   (use "git checkout -- <file>..." to discard changes in working directory)
  69. #
  70. #       modified:   ../../README
  71. #
  72. # Untracked files:
  73. #   (use "git add <file>..." to include in what will be committed)
  74. #
  75. #       ../../configure/apache/include/commit-c77a7ba
  76. no changes added to commit (use "git add" and/or "git commit -a")
  77.  
  78. $ git commit -a
  79.  
  80. $ git add ../../READM
  81.  
  82. $ git commit -m "fix"
  83.  
  84. $ git push
  85.  
  86. Done!
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top