Tag: git branch

Git “leaky” branches?

We usually do feature development on new branches and then bugfixes on the master branch. This time, for some reason, one of the feature branches had a leak where it was merged back into master when it shouldn’t have. From the screenshot, you can see that we have the feature branches sms_open and 121217. 121217 […]

Re-base sub-branch off master

still wrapping my head around GIT… I created a branch off another branch by mistake. Looks like this: c1…c2 / b1…b2…b3 / a1…a2…a3…a4 Meant to do this: b1…b2…b3 / a1…a2…a3…a4 \ c1…c2 I assume there’s some way to fix this but after some time with the docs etc. I’m not seeing it. Thanks!

Creating branch inside a branch in git

In my repository, I have a master branch and then a staging branch coming out of master branch. Now I need to add a third branch that should come out from staging branch. That means I need a branch coming out of another branch. Can anyone help in this? The syntax I used for creating […]

Git – Cannot delete remote branch

I made a git branch unintentionally named “0.2” which is also a tag. So I tried to remove it from origin: $ git branch -rD origin/0.2 Deleted remote branch origin/0.2 But then: $ git fetch origin * [new branch] 0.2 -> origin/0.2 Here is the error I got wwhen pushing: $ git push –force origin […]

How to maintain physical branch folders for git as available in TFS?

We have a huge product and that has many features, each features take very long, so we are maintaining short lived feature branches in TFS. For example, MAIN/ PROJECTMGT EMAILMGT etc.. And once complete, they are merged back to MAIN, and each different development team works on different branches. Merge Process Since each team works […]

How to delete “origin/origin/master”

This question already has an answer here: How do I delete a Git branch both locally and remotely? 37 answers

git How to merge a branch into the master branch by completely overwriting master branch

I started work on the master branch. Almost one year ago, I created another branch dev in which I made some changes. From that time on I continued work on dev branch. Now I want to merge dev into master which results in lot of conflicts. I want to merge dev into master by overwriting […]

Git strategy to use in deploying white label instances to different sub domains.

I have a situation where which git strategy is suitable to use? Situation : We have one application which has a git repository. In which we follow the branching strategy, Branch : develop : used by all developers to implement the features Branch : testing : where the code developed till current gets deployed to […]

“This branch is 1 commit ahead, 1 commit behind master” in Github while using “A successful Git branching model”

I am working in a clean repo with just a single file. I am the only developer. I want to do the develop-release-master workflow in A succesful git branching model so I did: Note: Please bear in mind that I have the fast forward off by default, so consider all the merge commands as merge […]

GIT: How to protect the branch from being removed by other developers?

After the first release of our product, we will be switching to a different branches for the main development and feature development. Is there a way to create a branch in such a way, so that we can protect it from being removed (accidentally or on purpose) unless you’re a specific user (based on role […]

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