Tag: merge

How to replace a git submodule with vendored in code?

I’ve been in the process of getting rid of git submodules lately. Sometimes I’m adding new files where there’s been the submodule. I’m looking for a nice way to drop a submodule, and add some files in it’s place without creating merge problems for pulling users. Here’s what I’m talking about: This is a commit […]

Command/steps for merging one branch into another more than once?

I get “Already up-to-date” messages when trying to merge one branch, ‘feature_1’, into another, ‘release_1’, more than once where changes have been committed to feature_1 in between merges. That is, I have something like: # Developer 1: create feature_1 branch with initial commit git checkout -b feature_1 origin/master git commit -am “Initial commit.” git push […]

git branch merging

I’m going through a tutorial and it said this command, “git branch -a” would list all my remotes, both local and remote. So i did that and this is what i got. David-Adamss-MacBook-Pro:releventz davidadams$ git branch -a * master remotes/flashdrive/master remotes/origin/HEAD -> origin/master remotes/origin/master David-Adamss-MacBook-Pro:releventz davidadams$ Master is the branch i’m currently on and is […]

Can I generate a “merge tool viewable” diff output with git?

For small chunks of code, I can manage writing: git diff SOURCE_FILE but when it gets past a number of lines, it gets difficult to watch. Is there someway of generating two files, one being the staged one, the other containing the modifications, and compare them using a tool like WinMerge?

Github – search merges

Is it possible to search through merge conflicts only in github? I was doing a merge a few days ago. I remember merging something with something else, and now i’m getting an error that seems related to that merge. Only issue is I can’t remember for the life of me where I made that merge. […]

Resolving conflicts in git version control

I’ve got a big problem but I bet it’s easy to solve. I’m developing a website together with a friend using GiT for versioning control. We’ve just modified different parts of the same CSS file and then commited, then he pushed his commit. We’re both using master branches in local and remote repository for we […]

Should Git workspace automatically adjust to the content of a specific branch?

Git checkout/pull doesn’t remove directories? I’m kind of new to git and slowly learning various parts of it. So forinstance I have a branch Master with FolderA I have later from Master created a branch Dev and added FolderB So Dev as result have FolderA and FolderB now when I do git branch master, I’m […]

git merge into master only overwrite changed files

Is it possible to merge branch edits into branch master with the following scenario: many changes were made on edits as well as new files added. many changes were also made to master as well as new files added. I’d like to overwrite any duplicate files in master and use the files from edits, so […]

Git diverged branches – revert changes

A new developer went crazy on a large git repository, really messed it up and pushed. All his changes can be thrown away. My problem: Our git hoster does not allow push –force, so I have to pull first. If I do so, I have A LOT of merges and conflicts, and there is no […]

Interactive rebase: modify a recent commit among a bunch of –no-ff merges

The goal I want to modify a recent commit, using rebase. The magic command is git rebase -i Let’s say you’re trying to delete the commit-in-question First, find out how far back that commit is (approximately). Then do: git rebase -i HEAD~10 –Source: Greg Hewgill’s answer to a less complicated git question The problem That […]

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