[git-users] Merge conflict
I only use Git to get the bleeding edge version of the project. A little while ago I added someone's topic to review the files. It has since been removed. It modified one file in master. Now, when I do a pull, I get a merge conflict. Stashing it doesn't work. How do I fix this? -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[git-users] File in master messed up after adding someone's topic
I just use git to keep up with bleeding edge changes to a project. Don't edit/commit or anything. Added someone's topic to get their files for review. Then removed the topic. However, one file in master was changed by adding the topic. (I didn't touch it.) Now I can no longer do a pull because it reports a merge conflict. I can access the latest version of that file (master version), and use copy and paste, but of course git then says I have edited the file and I must either stash or commit. Stashing reverts me to the incorrect version of the file. What can I do? Short of starting from scratch - the repository is about 5GB - 12 hours download. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [git-users] File in master messed up after adding someone's topic
On Friday, January 3, 2014 6:27:21 PM UTC+2, Philip Oakley wrote: > > "First, don't panic. Nothing is lost. > > It sound like the 'pull' workflow you are using, does *not* match the > work style of the upstream project." > Having removed the topic, I only have one branch - master. Somehow, the problem file is the version from the topic, not the version in master at Gitorious. Using Windows 7, mysysgit 1.81. My path includes C:\PROGS\Programming\Git\cmd where gitk.cmd is. If I run gitk I get an error message - see attachment. But gitk should be irrelevant as I only have one branch - master. It is just that somehow I need to get git happy with the correct version of this file. > > > "Then do a 'gitk --all' to view all the different branches and their > locations, and then do the update you need." > Aye, therein lies the rub!! I get told to either stash or commit. Stash doesn't help because I have not made local changes (git did it for me) and I tried a commit with the comment "Ignore/Delete - Fixing file conflict." Also didn't help. > > > > > - Original Message - > > *From:* nma...@iburst.co.za > *To:* git-...@googlegroups.com > *Sent:* Thursday, January 02, 2014 4:42 AM > *Subject:* [git-users] File in master messed up after adding someone's > topic > > I just use git to keep up with bleeding edge changes to a project. Don't > edit/commit or anything. > Added someone's topic to get their files for review. > Then removed the topic. > However, one file in master was changed by adding the topic. (I didn't > touch it.) > Now I can no longer do a pull because it reports a merge conflict. > I can access the latest version of that file (master version), and use > copy and paste, but of course git then says I have edited the file and I > must either stash or commit. > Stashing reverts me to the incorrect version of the file. > What can I do? Short of starting from scratch - the repository is about > 5GB - 12 hours download. > > -- > You received this message because you are subscribed to the Google Groups > "Git for human beings" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to git-users+...@googlegroups.com . > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. <>
Re: [git-users] File in master messed up after adding someone's topic
Just a bit more info. If I do a git fetch and then git diff -- I get no difference. But git still says I have unmerged changes. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [git-users] File in master messed up after adding someone's topic
A couple of points: 1) Because of bandwidth constraints at the time, I didn't do a clone, I did a shallow pull when I started. Not important at the time as I only do pulls. 2) So my system is unaware of origin. 3) The branch is master, 4) In another folder I work with a different repository. 5) Is git config relevant to each folder/repository, or is it system-wide? 6) Because config is not set-up correctly, I have to use git fetch git://gitorious.org/fg/fgdata. Having attended to the above, I may then be able to do git fetch git reset --hard origin/master. Thanks for all the help so far. Pity about the time-zones making the turnaround time so long. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [git-users] File in master messed up after adding someone's topic
Sorry, just checked a few things. Git does know about origin, git remote -v shows origin g...@gitorious.org/fg/fgdata.git (fetch and push) However, the response to git reset --hard origin/master is Ambiguous argument 'origin/master'; unknown revision or path not in the working tree -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [git-users] File in master messed up after adding someone's topic
Fixed my origin value and then did reset --hard origin.master and everything works now. This thread has been added to Favourites. Much obliged for all the help. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [git-users] File in master messed up after adding someone's topic
You are completely right. Fortunately for me, I only want to keep up with the changes, so I only need to pull , not push. So my initial git pull --depth 1 was fine. Worked for years. It was only when I got involved in a sub-project that I added another users' topic, *without having enough background in Git *that things went wrong. As regards all the tags and branches ag fg/fgdata, as long as I stick to master I am fine. I will never add a topic branch again without doing much more training in Git. It is not a quick-quick task to add a branch. And then think that *checkout* just means go to the other branch. IT DOESN'T!!! When I work on that topic again, it must be in a totally isolated/individual repository. The experts can then make it a part of *master.* But at the moment I am happy. I changed config.origin from g...@gitorious.org/fg/fgdata.git to git://gitorious.org/fg/fgdata.git and did git fetch git reset --hard origin/master and now everything works again. (mostly the other tags/branches are just version numbering of releases. What I get with a pull is the branch *next*, which is the bleeding edge version. Thanks again for all the help. If there is way to mark the topic as solved, please do so - I can't see how. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.