Hi guys, Total git n00b here. Thanks in advance for the help. I am really having trouble. I am working in a new system. We are using git as a versioning system and gerrit as a review system/remote repository.
Anyway, I was working on the branch 'master' and switched to another branch call it 12345, did some work there, made some checkins, pushed them to gerrit, no problem. Then I tried to switch back to master and the problems started. I switched back by doing git checkout master. When I switched back, git told me that my branch was behind remote (or possibly ahead, I'm not sure and can't reproduce the message). I did a git pull to get back into sync and a commit to separate the work I'm doing from the changes the pull did. I made my changes and did a commit. Then I tried to push to gerrit. Gerrit refused to accept my push saying that I don't have permission to push a merge. I didn't mean to do a merge at all, so I decided to look at my changes using git log (see a sanitized version of the git log output below). >From the output, it seems that the pull actually did a merge (commit dc613fdf1273fc5d002beccc3bc2c93f4ddc3f61). Did I make a mistake in doing the pull at that point? I didn't want to merge anything, I just wanted to sync my branch master to the remote master. I had no files in play. What should I have done? Am I missing something else here? * commit d97ceffd44a453b18bc25261c7572497d749b1c5 | Author: …. | Date: Wed Oct 10 13:56:15 2012 -0400 | | Added ability to… | | Change-Id: Ib784294ba37a2c300465e07b2aa8ed0fdb62470a | * commit dc613fdf1273fc5d002beccc3bc2c93f4ddc3f61 |\ Merge: 3eca78c 7d7c37b | | Author: ... | | Date: Tue Sep 18 14:57:09 2012 -0400 | | | | Merge branch 'master' of ssh://git.mydomain.com/backend | | | * commit 7d7c37b1cff1acee33405ba5d67cc3d7fc8457cf | | Author: ... | | Date: Tue Sep 18 14:10:04 2012 -0400 | | | | Added support for... | | | | Change-Id: I4cb41b61c7712f5b349dd701a3d059fd30e93c9e | | Reviewed-on: http://gerrit.mydomain.com/377 | | Reviewed-by: ... | | Tested-by: ... | | | * commit eec1693384ca316001c6f1df7281ad69426f269c | | Author: ... | | Date: Thu Jun 14 16:12:58 2012 -0400 | | | | Fix... | | | | Change-Id: I330013524d7b8b2403cec5558ec328dcd95b6476 | | Reviewed-on: http://gerrit.mydomain.com/294 | | Reviewed-by: ... | | Tested-by: ... | | | | * | commit cd08f9e73c8f4691344f95092bd5a1df47b03922 |/ Author: ... | Date: Tue Aug 28 17:16:02 2012 -0400 | | Server ... | | Change-Id: I463ed9365b34185b7352d8ae65a36ac09e7e3bd2 | * commit 359879c07328e30202886900404c222c3a2f260c | Author: ... | Date: Mon Jul 16 11:23:06 2012 -0400 | | Fix ... | | Change-Id: I2d6a2cd443dc354f9fea06635858b051e94ede1f | Reviewed-on: http://gerrit.mydomain.com/326 | Reviewed-by: ... | Tested-by: ... | * commit 10662c44fc29fc878f29e6c0309fdf3ef08da182 | Author: ... | Date: Thu May 31 16:21:55 2012 +0700 | | Fix request ... | | Change-Id: I8e0b3628edd1264dbb43f7f2aa479170ff6f2275 | Reviewed-on: http://gerrit.mydomain.com/277 | Reviewed-by: ... | Tested-by: ... -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/O-SDAwQJX4EJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.