Tag: git merge

How can I pull the changes from GitHub without pushing mine?

The problem is pretty simple. I use source tree to commit my changes, but I’m really a newbie and I don’t want to mess up with the common project. What should I do for keep the files I added WITHOUT committing them and at the same time have the master branch updated to the common […]

Can I delete old git branches

This question already has an answer here: Should I delete a branch after merging it? 2 answers

Does git change unmodified and uncommited files in merge?

Is it possible that when taking git pull, a file that has not been modified locally and has not been committed locally, changes in automatic merge and that the changes, possibly breaking a file, are then committed and pushed as made by me? The file changes locally of course if a newer version is on […]

Where do custom git merge drivers get stored?

I was reading this blog post, since I needed a custom git driver to merge a few json files in my git repo. The instructions on the script mention editing .git/config to add the merge and also editing the git attributes in .gitattributes but do not mention where to place the actual custom driver. Does […]

Is it possible to flag certain files to never cause merge conflicts in Git?

Is it possible, upon merges and rebases, to specify that certain files should automatically resolve in “use ours” (or some other policy) where a merge conflict would normally happen?

git merge to a branch without changes and commit

Say I have two branches, master and feature_new. If master and feature_new both have different commits on top of them relative to when they branched out, when I do a git checkout master git merge feature_new I will get a “merge commit” with the commit message Merge branch feature_new. But if master has no changes […]

How can you perform a git revert AND remove the merge history?

This question is in relation to How can you tell who merged which branch into git?. Basically, develop was accidentally merged into master before we were ready, causing master to be unstable. master was then pushed/pulled to various machines. In an attempt to resolve the issue, I performed a git revert to undo the changes […]

Bitbucket – Syncing Branch with another Branch

This may be a duplicate of How to keep a git branch in sync with master (I assume I can just replace Master with the other branch), but it’s vital that this works and doesn’t merge the wrong way around so I need to make sure. Scenario There was a branch called v1, and I […]

GIT: cannot push to origin/master

This is my situation. I had pushed version 2.1.6, but it was buggy, so I reverted my filesystem to the 2.1.5 and I then made some changes which I tagged 2.1.7. Now I cannot push 2.1.7 to origin/master as it says: Updates were rejected because the tip of your current branch is behind its remote […]

Get 'native' commits on a branch

I want to get only ‘native’ commits on a branch. It means: direct commits to the branch; merge commits; I do not want to get commits that came from a merged branch – only merge commits itself. How can I do this with git log?

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