Tag: git branch

What does 'Checking out files' stat indicate while switching to master branch in Git world?

I am using git bash. I created a brand new local git repository from a brand new public repository ( means it just had .gitIgnore file. no code) I branched off from my local master repository to a new repository ‘FromClearcase’ using: git branch FromClearcase git checkout FromClearcase I pasted 49 files of code into […]

Switching branches in Git with external dependencies

Has anyone had to deal with the issues of switching git branches in a project that has Maven (or any other external) dependencies? For example, suppose that in one branch I have a maven dependency, and in another I don’t (or have a different version required). Would I have to re-import maven dependencies each time […]

git-flow hotfixes with semantic versioning

Following Jeff’s tutorial at http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/, I initialised git flow with the standard settings: [~/tmp/test] $ git init Initialized empty Git repository in /Users/nrm/tmp/test/.git/ [~/tmp/test (master)] $ git flow init No branches exist yet. Base branches must be created now. Branch name for production releases: [master] Branch name for “next release” development: [develop] How to name […]

How to protect “master” branch in GitHub?

We are a team of a few people. Everyone works on a feature branch and merges his stuff through GitHub UI into master when one is ready. Now is it possible to prevent direct pushes to master, but instead create a pull request whenever a new feature is ready to be merged? Additionally it would […]

Bitbucket – Explanation on Branch Column

I’m using Bitbucket as my git repo and I’m having trouble understanding the column that shows the branches, from the Commits page. Let’s say I just pushed a branch called bug_fix. In the first row, I see “bug_fix” under the column for branches. But for other rows, when I start seeing 2 branches, or 3 […]

Squash commits directly on feature without rebase or merge

I’ve been reading a little about –squashing commits, but they all seem to be go hand in hand with a –rebase. I have a feature branch with a set of commits like this: (Feature) A –> B –> C –> D –> E –> F –> G / (Master) M1 –> M2 –> M3 Suppose […]

How do I delete a Git branch both locally and remotely?

I want to delete a branch both locally and on my remote project fork on GitHub. Failed Attempts to Delete Remote Branch $ git branch -d remotes/origin/bugfix error: branch ‘remotes/origin/bugfix’ not found. $ git branch -d origin/bugfix error: branch ‘origin/bugfix’ not found. $ git branch -rd origin/bugfix Deleted remote branch origin/bugfix (was 2a14ef7). $ git […]

Creating Maven assembly with files from different Git branches

We are working on a project in which we are using a number of Git branches with different content in each branch. We need to create .zip file using maven plugin in Jenkins with files from different branches. Is there any option available in Jenkins which supports this task? Thanks in advance

stop git push from pushing to multiple branches

I created a new branch (tags), checked it out, and whenever I push changes I use git push origin tags. However, the pushed changes are effecting both the master branch and the tags branch in my remote repo. I’m sure I’ve got the tags branch checked out (verified with git status). Can someone tell me […]

Remove inactive branches from IIS via TeamCity

I’ve got the following setup: I use git (Stash/BitBucket) as my versioning tool. My build- & deployment proccess is automated via TeamCity8.0.5 (TC) Feature & Bugfix branches are automatically deployed to an IIS Web Site. When I merge a feature branch and it gets deleted from git, it gets automatically hidden from display in TeamCity, […]

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