Tag: git merge

Restrict certain GitHub users to merge branches

Is it possible to restrict certain git users to merge git branches on GitHub? I want to let users commit, pull and push changes in current branch, switch to another existing branch, but do not allow to merge branches. Is it possible on GitHub.com or standalone git repository?

How to merge branch of forked repo into master branch of original repo?

There is an open source project on GitHub. Its original repo contains the most recent master branch. Now there is someone (not me) who has forked this repo, created a development branch from the master branch and added stuff to the development branch. What I would like to do now is to merge the development […]

How to resolve git error: “Updates were rejected because the tip of your current branch is behind”

I recently started using Git (previously I used subversion but I am now doing some collaborative work on a project that uses bitbucket and git). All has been going well up until today when I find a well meaning colleague has pushed changes to the Master instead of making a branch. This means that when […]

Why don’t commits follow the merge-base error?

Our process for git is a periodic merge down to our master branch so that the changes can be merged back out to our latest features branches. Since out latest rounds of merging from one branch to another, we are running into a problem in which the solution is not clear. We have a repository […]

Merging after directory got turned into submodule

I find that working with git submodules, I often encounter problems merging between commits which do contain a given submodules and those which represent the same code as a normal directory. Small reproducing example: # Create one project, to be used as a subproject later on git init a cd a echo aaa > aa […]

How to include part of another git repository using git subtree and merge updates in both directions

I have two git repositories show below. The first is structured like a typical python project. foo_repo/ .git/ setup.py foo/ __init__.py some_code.py tests/ bar/ .git/ I would like to include the foo_repo/foo/ directory in bar/ as a subtree and I want to be able to merge updates to foo_repo/foo/some_code.py both from the foo_repo repository to […]

Git: automatic fetching from remote repositories?

One irritating thing I find about using command line Git is having to manually sync my repository with remote repositories. I constantly get tripped up by commands like “git status” that I (mistakenly) expect to report the difference between my working directory and a repository on GitHub. (Of course it reports the difference between my […]

Git ignore remaining merge conflicts

After I solved all merge conflicts I care about, I want to merge regardless of all remaining conflicts. I’d like git to keep the files from the branch I want to merge into (–ours strategy). How can I do that?

DIRTY_INDEX at merge

I fetched some updates from upstream, merged, and got the following error message: FAILED: DIRTY_INDEX [filename] After a reset and another merge, I get this error: FAILED: DIRTY_WORKTREE [another-filename] All this is cryptic to me – what should I do now?

Difference between git pull . master vs git merge master

Having no remote repository, just one local repository with two branches. $ git branch -a master * devel Are following commands in this context the same/synonym? $ git pull . master and $ git merge master UPDATE: $ git help pull gives following information SYNOPSIS git pull <options> <repository> <refspec>… DESCRIPTION … Note that you […]

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