[git-users] Re: Merging from pull
On Thursday, December 5, 2013 7:08:14 AM UTC-5, Phillip Tutt wrote: What I would expect is the code now on the desktop would be the same as what was on the laptop...however, I found that some kind of merge was happening and conflicts, but shouldn't it just be a fast forward? Note, I did not make any changes on the desktop from the time I pushed to the remote to the time I pulled back down, but even if I did, I would expect the merge to work, but I don't have much faith in it at the moment due to my limited experience. Try to display your git log for both your Desktop and Laptop and compare them. -- 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] Re: Merging from pull
From what you've said your assumption is correct, it should just be a fast-forward pull/merge on the desktop at the end. Is there any chance you could provide the Git commands you're using at each stage? It might also be useful to know how you set up the repositories in the first place. Cheers, Alex On Thursday, 5 December 2013 12:08:14 UTC, Phillip Tutt wrote: Hi guys, I am pretty new to git, but I have found that it doesn't work as I would expect. I work sometimes from my laptop and other times from my desktop, each having a local git repository. I have set up a remote, which I push the changes from my branches to. Now, what I would expect is something like this, where each letter represents the code of a commit. Desktop A--B C \ / RemoteB C \ / LaptopB--C 1. A = Initial commit on local repository 2. B = commit some changes 3. B = changes pushed to remote 4. B = code pulled from remote to laptop 5. C = commit some changes made on laptop 6. C = push changes from laptop to Remote 7. C = pull changes from remote back to original branch on desktop. The command I used for step 7 was: git pull remote branch What I would expect is the code now on the desktop would be the same as what was on the laptop...however, I found that some kind of merge was happening and conflicts, but shouldn't it just be a fast forward? Note, I did not make any changes on the desktop from the time I pushed to the remote to the time I pulled back down, but even if I did, I would expect the merge to work, but I don't have much faith in it at the moment due to my limited experience. There's probably an easier way to achieve what I am doing, but hoping someone can provide some guidance? Thanks in advance. -- 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] Re: Merging from pull
This is the bit that doesn't make sense: 1. Remote last log entry: 2013-11-04Philticketing and questions workinghttps://git.eventgate.com.au:9443/commit/eventgate.git/4a09c3c9093b53989e4fff5cc392299364315402 admintemplatehttps://git.eventgate.com.au:9443/log/eventgate.git/4a09c3c9093b53989e4fff5cc392299364315402 4a09c3 2. Desktop last log entries, note, the last commit was after I had to fix the merge conflicts and then I committed. But looking at the log there shouldn't need a merge, since the latest commit the Remote and Desktop should just be ticketing and questions working: $ git log commit b1a68b9de0c5097810ffd6c4eb9f006e4a090616 Merge: 53a9da3 4a09c3c Author: Phil x...@gmail.com Date: Thu Dec 5 22:07:41 2013 +1100 fixed merge conflicts commit 4a09c3c9093b53989e4fff5cc392299364315402 Author: Phil x...@gmail.com Date: Mon Nov 4 16:33:57 2013 +0800 ticketing and questions working On Saturday, 7 December 2013 02:12:39 UTC+11, Huu Da Tran wrote: On Thursday, December 5, 2013 7:08:14 AM UTC-5, Phillip Tutt wrote: What I would expect is the code now on the desktop would be the same as what was on the laptop...however, I found that some kind of merge was happening and conflicts, but shouldn't it just be a fast forward? Note, I did not make any changes on the desktop from the time I pushed to the remote to the time I pulled back down, but even if I did, I would expect the merge to work, but I don't have much faith in it at the moment due to my limited experience. Try to display your git log for both your Desktop and Laptop and compare them. -- 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] Re: Merging from pull
Please compare the log from laptop and desktop. -- 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] Re: Merging from pull
For sure. This is where I was fumbling to try to get it all working: 1. I set up a repository on the desktop, with the Git init here context menu on the folder 2. I add code and commited: git add . --all git commit -m some comment 3. On thing to note is I don't have a master branch...'master' didn't make much sense to me, I have a release branch and feature branches. At the moment I am working in the feature branch 'admintemplate' with the view to merge it into the release branch when it is ready. 4. I installed gitblit on my thecus NAS and set up a repository using the gitblit 5. I created the remote: git remote add thecus url provided by gitblit 6. I pushed the Desktop code to the Remote: git push thecus admintemplate 7. I created a git repository on the Laptop using Git init here 8. I then added the remote to the Laptop (as in step 5. above) 9. I think I just did a pull to get the code from the remote to the Laptop: git pull thecus admintemplate 10. Modified code on the Laptop, pushed back to the remote. 11. Performed a pull from the remote to the Desktop...and that's when I got the merge conflicts: git pull thecus admintemplate Where I feel unsure is about tracking and cloning...I have read the basic docs but my understanding is not deep enough to know exactly what is going on under the hood. I set up the remote with the following: git remote add thecus On Saturday, 7 December 2013 03:41:46 UTC+11, Alex Lewis wrote: From what you've said your assumption is correct, it should just be a fast-forward pull/merge on the desktop at the end. Is there any chance you could provide the Git commands you're using at each stage? It might also be useful to know how you set up the repositories in the first place. Cheers, Alex On Thursday, 5 December 2013 12:08:14 UTC, Phillip Tutt wrote: Hi guys, I am pretty new to git, but I have found that it doesn't work as I would expect. I work sometimes from my laptop and other times from my desktop, each having a local git repository. I have set up a remote, which I push the changes from my branches to. Now, what I would expect is something like this, where each letter represents the code of a commit. Desktop A--B C \ / RemoteB C \ / LaptopB--C 1. A = Initial commit on local repository 2. B = commit some changes 3. B = changes pushed to remote 4. B = code pulled from remote to laptop 5. C = commit some changes made on laptop 6. C = push changes from laptop to Remote 7. C = pull changes from remote back to original branch on desktop. The command I used for step 7 was: git pull remote branch What I would expect is the code now on the desktop would be the same as what was on the laptop...however, I found that some kind of merge was happening and conflicts, but shouldn't it just be a fast forward? Note, I did not make any changes on the desktop from the time I pushed to the remote to the time I pulled back down, but even if I did, I would expect the merge to work, but I don't have much faith in it at the moment due to my limited experience. There's probably an easier way to achieve what I am doing, but hoping someone can provide some guidance? Thanks in advance. -- 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] Re: Merging from pull
Sorry...here's the log from the laptop. However, it has a couple of commits that have not been pushed to the remote yet: commit c21b88e665603310b74b8f3c80f23782ebb4d562 Author: Phil x...@gmail.com Date: Tue Nov 19 20:17:18 2013 +0800 payment progress commit ac4df844ef54bb09fc8a0793c781b6a74e44731b Author: Phil x...@gmail.com Date: Wed Nov 6 22:53:39 2013 +0800 added html editor - working ok commit 4a09c3c9093b53989e4fff5cc392299364315402 Author: Phil x...@gmail.com Date: Mon Nov 4 16:33:57 2013 +0800 ticketing and questions working On Saturday, 7 December 2013 14:38:53 UTC+11, Huu Da Tran wrote: Please compare the log from laptop and desktop. -- 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] Re: Merging from pull
On Friday, December 6, 2013 10:48:29 PM UTC-5, Phillip Tutt wrote: For sure. This is where I was fumbling to try to get it all working: 1. I set up a repository on the desktop, with the Git init here context menu on the folder 2. I add code and commited: git add . --all git commit -m some comment 3. On thing to note is I don't have a master branch...'master' didn't make much sense to me, I have a release branch and feature branches. At the moment I am working in the feature branch 'admintemplate' with the view to merge it into the release branch when it is ready. 4. I installed gitblit on my thecus NAS and set up a repository using the gitblit 5. I created the remote: git remote add thecus url provided by gitblit 6. I pushed the Desktop code to the Remote: git push thecus admintemplate 7. I created a git repository on the Laptop using Git init here This should have been a git clone url provided by gitblit git checkout admintemplate Because this will make sure you have the same base commit to start before the pull (for next time). You then simply skip the next step (git add remote). 8. I then added the remote to the Laptop (as in step 5. above) 9. I think I just did a pull to get the code from the remote to the Laptop: git pull thecus admintemplate 10. Modified code on the Laptop, pushed back to the remote. 11. Performed a pull from the remote to the Desktop...and that's when I got the merge conflicts: git pull thecus admintemplate Where I feel unsure is about tracking and cloning...I have read the basic docs but my understanding is not deep enough to know exactly what is going on under the hood. I set up the remote with the following: git remote add thecus Hope this helps. HD. -- 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.