Tag: git branch

is it possible to provide alternative fixes in the same branch?

I have two alternative fixes for a bug. Each fix option is a single commit, fixes are based on same parent. I want to provide those commits for prior review before we decide which to use. Currently I have option of creating and pushing two remote branches, one for each fix commit. Is there better […]

Git duplicate one branch to another

I have the following case : K—L new-feature / H—I—J—M dev-team1 / E—F—G dev-main / A—B—C—D master And I want to move only the new-feature (K—L) branch in dev-main branch without (H—I—J) form dev-team1, however I want that new-feature (K—L) branch to remain as a separate branch. Something like that : K—L new-feature / H—I—J—M […]

How to make existing git branch track a remote branch?

Possible duplicate: Getting existing git branches to track remote branches I know how to make a new branch that tracks remote branches. But how do I make an existing branch track a remote branch. I know I can just edit the .git/config file but it seems there should be an easier way.

Git branching to keep sub-projects up-to-date

I have a problem that’s very hard to google, so I decided to ask about it here. I’ve created a system (a rails app) that handles user registration for a conference. The system is under active development. Now, I’m helping to run another conference, and I want to use pretty much the same system, with […]

Git checking out an older tag with -b pulls the most current commit

I’ll preface this with I’m fairly new to git, having migrated from a SVN background. I’ve been using a git-flow based workflow and tagging releases with a numerical standard like v0.2.0 Tonight I went to deploy from my sandbox to main site and noticed that if I did a git checkout -b tags/v0.2.2 that it […]

bash show git branch as dirty all the time

I am using a bash script that I found online somewhere, and it is everywhere, to display current git branch. function parse_git_dirty { [[ $(git status 2> /dev/null | tail -n1) != “nothing to commit (working directory clean)” ]] && echo “*” } function parse_git_branch { git branch –no-color 2> /dev/null | sed -e ‘/^[^*]/d’ […]

Git: unrecognised branch name

In git, I named a branch: parse() The name has been accepted, but when merging I get the error: git merge parse() bash: syntax error near unexpected token ‘(‘ Is it possible to rename a branch? Are there other ways to fix this problem? Thank you! Platform: Linux, bash

How do I make unpushable commits pushable?

Master Branch had commits like this : A -> B -> C(HEAD) . HEAD was at C. What I did : I checked out B and made commits on top of it. Now the tree looks like this : A -> B -> C(master)(origin/master) | | -> B1 -> B2(HEAD) git status on the project […]

How can I switch git branches when there is an untracked file error?

Using SourceTree when I try to switch back to master from a feature branch I created I get an error: Updating the following directories would lose untracked files in it I want to switch back to master to make another feature branch but am unable to do so.

Cleaning a git branch with a poor-quality commit log

Rather than ask about specific git verbs (which the git documentation is based around), I’d like to ask what is the best approach for this particular task. I have a git branch with an ugly commit log, due to having been forced to commit to test the app. Lots of commits like: Fix typo Do […]

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