more git weirdness (git rebase, merge conflicts
I have a local/development branch tracked to origin/development. I made no changes to local/dev and did a git pull with rebase, I did not expect any conflicts. I got a conflict and was thrown onto another branch. I attempted a merge (using IntelliJ) accepting everything from the server but a variable definition was missing for some odd reason and the merge was not successful (merge was resolved but the file would not compile) so I decided to simply go back to my dev branch and figure out how to do a git pull -f (force overwrite of all local files so that I could get my local/dev back into sync with origin/dev. On my screwed up branch that I was thrust onto: I typed: $git rebase --skip= I was stuck in a rebase (rebase failed, was thrown onto a tmp branch and thought this would get me out of there) Now I have been sitting here for an hour watching Applying: message scroll by and it looks like the messages are going backwards into the past one by one. What the hell is happening? Applying: add log information Applying: previous message and it goes on and on and on. All I want to do at this point is to get back to my dev branch and force pull from origin/dev while keeping all local files that have not been added to my local repo. How do I stop this madness and get back to local dev and force pull from origin/dev = which is our master. Any help would be greatly appreciated. thanks J.V. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
which files will have conflicts between two branches?
I have two local branches (tracked to remote) that are in sync (did a git pull on both branches from their corresponding remote). Is this the best way to merge? I would be merging local/branch1 = local/branch2 (test this branch) and then push local/branch2 = origin/branch1 (and would expect no merge conflicts if anyone has not checked in anything. --- Also with two local branches, Is there a way to get a list of files (one line per file) of files that would have merge conflicts that would need to be resolved? thanks J.V. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
merge help
I have a branch for which I have made 0 (nada) changes. I did the following: $git pull --rebase --no-stat -v --progress origin mybranch I get the following U java/Profile.java Pull is not possible because you have unmerged files. Please, fix them up in the work tree, and then use 'git add/rm file' as appropriate to mark resolution, or use 'git commit -a'. -- (there is no local master branch), because of the conflict I was put on (no branch) * (no branch) branch1 dev tmpWork Question 1) Why did I get a merge conflict if I have not changed any files? Question 2) What is the command to show the difference between the files? (is there a visual tool that would let me merge)? Question 3) What is the command I would type to accept theirs and overwrite my local? After this would I need to $git add commit push the file? If someone could guide me through this initial process, (what is best recommended it would be most helpful). thanks J.V. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
stuck and need unstuck (git checkout)
I was on a branch (local tracked with remote), and I wanted to checkout a remote branch so did: $git co myRemoteBranch and got a message that a lot of jar files were being untracked (files were locked). I had a server running that had some of the jar files locked, so it could not update and untracked them all. What I want to do now is: 1. switch branches 2. delete this locally created branch 3. re-check out again so all will be well. I cannot switch branches because it says my untracked files will be overwritten. How do I switch branches? I have no commits to make and simply want to go back. git reset and git stash do not get me there. thanks J.V. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
git repo on Win 2008
What is the best way to host a shared git repo on a Windows 2008 box? I would like to create a repo on the 2008 box (that everyone will pull/push to), but add the initial code from my developer (Windows7 box). J.V. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: problem switching branches
On 2/26/2013 10:17 PM, Jeff King wrote: On Tue, Feb 26, 2013 at 04:08:55PM -0700, J.V. wrote: I was on my master branch, I then checked out a branch ( origin/somebranch ), made no updates but did a few git pulls on the branch over about a week; then made a small change to only a single file committed pushed. Now am trying to go back to my master branch and get: error: The following untracked working tree files would be overwritten by checkout: lib/derbyclient.jar Please move or remove them before you can switch branches. Aborting I did not put that jar file there (I edited a single config file), how do I now get back to my master branch? Not knowing anything about your project, it's impossible to say for sure, but this often happens with something like: 1. lib/derbyclient.jar used to be generated by your project's build procedure This jar was put on the master branch last year; It does not exist in the branch that I am now on where I get the error message (I am on a branch that was created for a previous release). 2. You did a build of your project, generating the file in your working tree. This jar is downloaded from the web and put there; we did not generate. 3. Meanwhile, somebody upstream added and commited lib/derbyclient.jar directly in the repository. This might have been intentional (it used to be a generated file, but now is included as source), or it may have been an accident (mistaken use of `git add`). It was committed intentionally, last year, but does not exist in the branch that I am now on, but it is there. 4. You try to switch to the master branch with the new commits from (3). Git sees that the copy of the file in your working tree would be overwritten and lost (since it was never committed by you), so aborts. If you are sure that the file in the working tree does not contain anything interesting, you can use git checkout -f master to force the overwrite. I will try this. I do not want to muck up the branch that I am now on by deleting anything. Any ideas how this happened? You won't hurt the branch you are on; you will just lose the contents in the untracked working tree file. That's probably fine if it is a generated file, as in the scenario I described above. We know that the file is not included in the branch you are on (otherwise, it would not be listed as untracked). And even if it were, you would only impact the branch by committing the changes, not by changing the working tree. Obviously someone put derbyclient.jar there, not sure, but it is supposed to be there so do not want to remove as advised. It won't be removed; it will be overwritten with the version of the file that is on master. Which is probably what you want; you may want to look at `git log master -- lib/derbyclient.jar` to see why it was added. -Peff -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
problem switching branches
I was on my master branch, I then checked out a branch ( origin/somebranch ), made no updates but did a few git pulls on the branch over about a week; then made a small change to only a single file committed pushed. Now am trying to go back to my master branch and get: error: The following untracked working tree files would be overwritten by checkout: lib/derbyclient.jar Please move or remove them before you can switch branches. Aborting I did not put that jar file there (I edited a single config file), how do I now get back to my master branch? I do not want to muck up the branch that I am now on by deleting anything. Any ideas how this happened? Obviously someone put derbyclient.jar there, not sure, but it is supposed to be there so do not want to remove as advised. any ideas on how I can get back to my master branch and get out of this? -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
git checkout problem
I was on my master branch, I checked out a branch (origin/somebranch), did nothing, made no updates but did a few git pulls over about a week; made a small change to one file comitted pushed. Now am trying to go back to my master branch and get: error: The following untracked working tree files would be overwritten by checkout: lib/derbyclient.jar Please move or remove them before you can switch branches. Aborting I did not put that file there, how do I get back to my master branch? I do not want to muck up the branch that I am now one. Obviously someone put derbyclient.jar there, not sure, but it is supposed to be there so do not want to remove. any ideas? -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html