Tag: git branch

Is there any harm letting a git branch “grow old”?

So I’ve heard of the branch-per-feature workflow using Git, and I’ve also read some reasons why this could be a bad idea. My real question is this – if I’m developing just a small feature (like a simple regex time parser), after merging this branch back into the trunk, what happens (or should happen) to […]

How to rename a git branch locally and remotely?

This question already has an answer here: Rename master branch for both local and remote Git repositories 13 answers

In Git, how can I list all files that exist in branch A that do not exist in branch B

Is there a Git command I can use that will list the names of all files that exist in one branch that do not exist in another branch? Background: Someone deleted some history and then pushed origin/master. Some team members have been saying they are missing some files. I think I have recovered the missing […]

“modified: Gemfile.lock”, Why?

When I ‘git status‘ on my sub branch, I frequently see “modified: Gemfile.lock“, BUT I have never touch this file, why git always tell me it is modified?? I am developing Rails 3 application under Ubuntu machine.

How to combine multiple commits in to one without losing history

I have multiple commits in one branch. When I push these commits for code review, our code review tool creates one review for each commit. To avoid this I want to merge multiple commits to a single commit. At the same time I don’t want to lose the history of commits. Is it possible to […]

Move branch to another branch

I have started doing some work on a branch which I have in term realised was the wrong branch. Is there a way to move a branch to a different branch. For example: A — B — C — D — HEAD \– E — F — G — H — I — J \– […]

Git: How can I merge changes made between two tags to another branch?

I’m trying to manage our Moodle instance on our own branch of the Moodle repo. I checked out tag “v1.9.11” of branch “MOODLE_19_STABLE”, then copied that to a new branch “COE”, where I’ve added in our custom theme, etc. Now that tag “v1.9.12” exists, I want to merge the commits up to that tag into […]

Branch does not exist

the command git branch –set-upstream-to develop origin/develop results in the error fatal: branch ‘origin/develop’ does not exist I am not sure what this means other than origin develop does not exist. Does that mean it doesn’t exist on the server or on my local machine? I am a git newbie but I am in the […]

“Layering” git repository

I’m using git on a daily basis for a while now, and this time I’ve run into a problem which I could describe like this. I have a repository which holds entire website structure, and web root is in the root of the repository. Everything was fine until that was repository for a single site. […]

Detailed explanation of 'git remote show'

I honestly cannot find any detailed documentation of the output of git remote show (certainly not on the man page) In particular, a clear, exact explanation of the Local sections would be appreciated. An example of what I find confusing: Here I have two remotes, klas and origin and the output they produce: > git […]

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