Tag: git merge

git – merge issues after deletion of file from FS

I have 2 branches viz. dev and current I am currently working on current which is created from dev. Now, I made some changed to few files which included deletion of one file from the file system. I did the following: Remove from File System git commit -a -m “File deleted” git push origin current […]

Git – Unable to merge after updating index to assume local files as unchanged

I marked a local file as unchanged by updating the index, using: git update-index –assume-unchanged <file1> Though, file1 is present in the remote repository. Now when I’m trying to merge a remote branch by: git checkout myBranch git merge origin/myRemoteBranch I get an error which says: error: Your local changes to the following files would […]

Make git pull before push

I have started working on my own feature branch, and I did multiple commits, then I want to switch to master branch and merge my commits from my feature branch, after I want to push the local master branch to remote branch. But before to switch to master branch, I did ‘git pull’ and it […]

Git merge between 2 branches: is parents order relevant for later merges?

Let’s say I have 2 branches: master and feature, where master represents the stable main stream. Now I want to bring new fixes from master into my feature branch. In the past we tried to merge from master into feature branch but this workflow caused some problems of changes being reverted later on when integrating […]

Different results for git Merge and Rebase

Git merge and rebase aim is the same, rejoining two branches together in order to get a single up to date branch. When trying the Merge and Rebase tool in Android Studio(which uses git commands obviously), I’m getting different results. Merge – show me real conflicts between many files. Rebase – Show only 1 conflicted […]

Git – bring in only old files from origin

I have a local branch module_update that I am currently in which contains ONLY the files I have changed since my original clone of origin. What I would like to do now is pull the files from origin that module_update doesn’t contain. There are files in module_update which are newer versions of files from origin. […]

Creating an orphan branch but still be able to merge from another origin

Here is the scenario. I have an origin1 remote with a develop branch. This branch contains lots of commits and history. From that branch, I want do create an orphan branch (develop) into origin2 remote. (origin1/develop -> origin2/develop without any the history). Is it possible to keep origin2/develop orphan without inheriting the history when I […]

''subl' –wait' doesn't work while merging branch

I followed few articles over the pretty attributes on Git 2.10 release note. Going through which upgraded the git to 2.10.0 and made changes to global .gitconfig resulting as follows – [filter “lfs”] clean = git-lfs clean %f smudge = git-lfs smudge %f required = true [user] name = xyz email = abc.def@gmail.com signingkey = […]

How do I apply different merge drivers for different branches

I have the following in my .git/config: [merge “customDriver”] name = A custom merge driver driver = ./mergepom %O %A %B %L %P recursive = text Where mergepom is a bashscript. In .gitattributes i have defined temp.txt merge=customDriver. This executes perfectly fine, and the bash script gets executed. However, I would like to define different […]

gitlab changing project path

I forked some repository with only README.md/.gitignore files from specific gitlab repo on my profile, cloned it to remote repository on my desktop (git remote add gitlab “clone_url”, made some work&commits and pushed it on my fork git push gitlab master. Then I opened merge request to gitlab’s master repository of that fork via gitlab […]

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