git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Urgent: Issue with GIT ...

From
Angus Hammond <angusgh@gmail.com>
Date
Jun 25, 2012, 13:14 UTC
Message-ID
<CAOBOgRb9bMHSmMrj2tw56U_eSYjR+93=9ryE9YOcCsX+mVYeRA@mail.gmail.com>
In-Reply-To
<1340628925770-7562100.post@n2.nabble.com>
On 25 June 2012 13:55, guruprasad <guruprasadkinI@gmail.com> wrote:
> remote: error: its current branch; however, this is not recommended unless
> you
> remote: error: arranged to update its work tree to match what you pushed in
> some
> 4) But, modified things in files did not get reflected. i tried to push from
> A-->B and B-->A. both dint work.
> 5) Push command i tried after modifying file, staging and committing.
>

I *THINK* the problem you're having is that the push to A updates the repository itself, but doesn't update the working directory unless you explicitly tell it to from machine A later on. This is why you got that horrible long error message when you did the git push, git was trying to stop you from creating a state where the repository and the working directory were different.

It seems like the solution would be to checkout master on machine A after you push, or even better, set up a bare repository somewhere on one of the systems and arrange for both of the repositories you work in to push/pull to that one.

Angus
Previous: jaseem abidNext: Konstantin Khomoutov
Message 5 of 10 in “Urgent: Issue with GIT ...”
  1. guruprasadJun 25, 2012
  2. Konstantin KhomoutovJun 25, 2012
  3. guruprasadJun 25, 2012
  4. jaseem abidJun 25, 2012
  5. Angus HammondJun 25, 2012
  6. Konstantin KhomoutovJun 25, 2012
  7. Andy HawkinsJun 25, 2012
  8. KevinJun 26, 2012
  9. Andy HawkinsJun 26, 2012
  10. KevinJun 26, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.