On Friday, April 28, 2023 at 2:19:07 PM UTC-7 Tassilo Horn wrote: Dan Stromberg <stro...@gmail.com> writes:
> I'm getting _many_ Merge records that look like: > Merge branch 'develop' of ghosthub.whatever.net:abcd-def/ghij-jk… > > ...and I don't know where they are coming from. > > The merge records do not appear to show up in 'git log -v'. I only see > them in Ghosthub pull requests (Ghosthub being like Github, but > private). "git log" shows the log of the currently checked out branch. Maybe the merge commits are in some other branch? Try "git log --graph". "git log --graph" only showed one such entry, and it was created by someone else. > I suspect the merge records may be coming from this small bit of shell > script I've been using to pull from the master repo into my personal > repo: > git fetch upstream > git checkout "$branch" > git config pull.rebase false > git pull upstream "$branch" > git push origin "$branch" > > Does that snippet look responsible? I don't know. If you just want to update your private clone with the changes your colleagues pushed to the company's central repository, then it looks at least strange. Why are two remotes "upstream" and "origin" involved? "origin" is my repo. "upstream" is the more official repo. My script actually removes my git repo (git repos, really) entirely, before doing the above listed steps. I mean, you pull from upstream and push to origin as if you were someone integrating changes from some upstream project into a company-owned fork or something like that... Yes. I just want to get all the recent changes from upstream (the repo for the team as a whole), and add them to origin (my individual repo). Otherwise, origin keeps getting more and more stale. > If yes, how might I change it to stop creating all those merge > records? If no, any guesses what else might be causing it? Merges are unavoidable when integrating the work of people working in parallel. However, if you have set merge.ff to false, then every merge will create a merge commit even though it could be a "fast-forward" (see "man 7 gitglossary"). I believe my merge.ff is set to nothing, so false: $ git config merge.ff below cmd output started 2023 Mon May 01 08:22:13 AM PDT above cmd output done 2023 Mon May 01 08:22:13 AM PDT I'll try setting it true for a while. -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/d527bc01-d98a-4039-b995-4f15d30314cdn%40googlegroups.com.