Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>git branch -v indicates that my commit was on (no branch). As for the add, I initially commited the changes through Eclipse (with the git plugin)...when I do git add from the command line, it doesn't seem to do anything</p> </blockquote> <p>That means you are in a <a href="https://stackoverflow.com/questions/3965676/why-did-git-detach-my-head/3965714#3965714">DETACHED HEAD</a> mode.<br> You can add and commit, but from the upstream repo point of view (ie from the GitHub repo), no new commits are ready to be pushed.<br> You have various ways to include your local (detached <code>HEAD</code>) commit back into a branch, which you will be able to push then.<br> See:</p> <ul> <li>"<a href="https://stackoverflow.com/questions/6048425/not-currently-on-any-branch-git-commit-checkout-when-not-in-any-branch-did">Not currently on any branch + <code>git commit</code> + checkout when not in any branch. Did I loose my changes?</a>" </li> <li>"<a href="http://sitaramc.github.com/concepts/detached-head.html" rel="nofollow noreferrer">detached <code>HEAD</code> explained</a>".</li> <li>"<a href="https://stackoverflow.com/questions/5772192/git-how-can-i-reconcile-detached-head-with-master-origin">Git: How can I reconcile detached <code>HEAD</code> with master/origin?</a>"</li> <li>"<a href="http://eclipsesource.com/blogs/2011/05/29/life-lesson-be-mindful-of-a-detached-head/" rel="nofollow noreferrer">Git Lesson: Be mindful of a detached head</a>"</li> <li>"<a href="http://alblue.bandlem.com/2011/08/git-tip-of-week-detached-heads.html" rel="nofollow noreferrer">Git Tip of the Week: Detached Heads</a>"</li> </ul> <p>The OP mentions this article in order to fix the situation:<br> "<a href="http://edspencer.net/2009/10/git-what-to-do-if-you-commit-to-no-branch.html/comment-page-1" rel="nofollow noreferrer">git: what to do if you commit to no branch</a>"</p> <blockquote> <p>all we need to do is checkout the branch we should have been on and merge in that commit SHA:</p> </blockquote> <p>Note that instead of merging the SHA1 that you would have somehow copied, you can memorize it with a script, using <code>head=$(git rev-parse HEAD)</code>:<br> See "<a href="https://stackoverflow.com/a/3467576/6309">git: reliably switching to a detached HEAD and then restore HEAD later, all from a script</a>".<br> Then you can merge that detached <code>HEAD</code> back to the right branch.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload