Tag: git merge

libgit2sharp what is correct sha to supply to GitHub API merge pull-request?

GitHub API requires merge pull-request to be submitted as PUT /repos/:owner/:repo/pulls/:number/merge with request body json { “commit_message”: “blah”, “sha”: “{SHA that pull request head must match to allow merge}”, } Following a commit, push, create PR, what libgit2sharp property supplies the correct sha ? For the current branch, it appears Branch.Tip.Sha is the correct value, […]

How to find out parent revisions of an in-progress merge?

I’ve started a merge, but it had conflicts which I’ve resolved, and now it’s all staged ready for commit. I just want to double-check which parent revisions I’ve merged. Things tried so far: git show with the %P format specifier – except I cannot figure out how to get it to tell me the parents […]

Git Rebase or Git Merge?

I have two branches. Both are feature branches – new-ui and video-upload. video-upload is a fork of new-ui. However, video-upload has a TON of commits. I have multiple developers working on new-ui, and one just completed video-upload. But I can’t quite figure out which will be the cleaner option to combine the two. I want […]

git: why can't I delete my branch after a squash merge?

I have a git repo with mainline (equivalent to master) and some local feature branches. For example: $ git branch * mainline feature1 feature2 feature3 When I do the following, I am able to squash merge all of my edits in a feature branch into one commit to mainline: $ git checkout mainline $ git […]

How to commit & push selected files but not all in Git

I have a git repo with two branches: develop and master. I work mostly at develop and when files are ready (sometimes not so sticky to this affirmation) I merge them to master branch to put them on production. Take a look to this pic: All that files comes from develop branch and was merged […]

Merge conflict in a file that wasn't modified in either branch

When I try to rebase branch featureX on master, I get a conflict in a file (let’s call it moduleA/foo) that was not modified in either master or featureX since they diverged! I checked that with the following log command: git log master…featureX — moduleA/foo and the result was empty (no commit on either branch […]

Merge strategy for whitespace only changes?

I did a code format in master branch. It mainly fixed whitespace issues like: formatting tab space lengths, adds and removes newlines before and after braces. The problem is, when I try to merge master from other branches I get a lot of conflicts. Is there some strategy to bring in whitespace changes to other […]

Git rebase for a branch created days back

I need help in understanding git rebase for this situation. I checked out a branch created by some one 10 days back. I checked out using git checkout -b <some name> origin/branchname (I just used different name to identify it) After checkout, if I do rebase by being in this checked out branch, git rebase […]

Git merging development branch with master for production versions

I’m using Git for code versioning. I have a development branch on which i’m doing all the dirty development. Every time I publish a production version to the world, I want to put it under my master branch. The problem is that whenever I merge development and master, master receive all development history. I want […]

What is a trivial merge in git?

Sometimes when I do a pull instead of a rebase after a simple one file change commit I see the following in the master log: Trivial merge But there’s no diff of what changed? What’s the point of this log message? Did anything change I don’t know of? It scares me.

Git Baby is a git and github fan, let's start git clone.