Tag: branch

How find most recent tag for current revision in Git/HG/Bzr?

Currently in my practice I use VERSION file to store: major=2 minor=0 fix=1 which mean that sources for product version v2.0.1 or newer. Before each release I must commit update to this file so tag with name tag2.0.1 or release-2.0.1 cover above content (and not previous version!). I think that it is possible to avoid […]

gitworkflows – how exactly to graduate a branch?

I have a git branching model pretty much like the one described in gitworkflows http://www.kernel.org/pub/software/scm/git/docs/gitworkflows.html and here http://members.cox.net/junkio/git/MaintNotes.html I have some doubts about how exactly to graduate a branch and what to do with commits that fix bugs that only happen when 2 different branches interact. Specifically, I have these branches: production: exactly the same […]

Git vs SVN: can I have single change in history for several branches?

We have to keep 2 product versions. Now, some changes in each version have to be backported to another version. In SVN, if I made “change” to version 1, I merge this revision to version 2 and give comment like: “Merged ‘change’ from v1”. This is awkward in many ways. Even worse if I merge […]

“Reverse-merge” a branch

Assume I have a branch case-xyz where I do my work for case #xyz, “Implement Hello World.” During development, I add debug outputs etc. which should not be part of the final commit. Can I do something like the following: Branch to case-xyz-debug and commit debug code only there. Occasionally merge case-xyz-debug into case-xyz. Commit […]

dotfile management for different machines with git branches reasonable?

I set myself up a dotfiles repo, hosted on a remote server and used on different machines. For some things I’d like to have individual configurations, e.g. the environment variables differ between machines. I thought, it would be nice to have an extra branch for the machine-dependent changes, so for example I have the branches […]

git checkout '…' always results in error: pathspec '…' did not match any file(s) known to git

We ran into a problem with our development branch. Long story short, I’ve deleted the branch and recreated it from master. However, every time we create a new clone of the repository and checkout development we get the following: $ git checkout development error: pathspec ‘development’ did not match any file(s) known to git. I’m […]

Git merge and resolve any conflicts to current branch

So I have my master branch, along with branch ‘bob’. I’ve made many changes in both and now I want merge master into bob to keep him updated. The only thing is, if there is a conflict I want it to automatically resolve to bob. I’ve been recommended the following: git checkout bob git merge […]

What is the base branch when a new one is created?

I need to confirm/correct my assumptions when creating branches. If I’m in master branch, after doing: git checkout -b some_branch it means I have started a new branch from master. On the other hand, if I checkout another branch, and create a branch there: git checkout some_branch git checkout -b other_branch This means I’ve created […]

How to log every branch last commit time?

How to log every branch last commit time? Log the time relative today is excellent. I know git branch -v show sha1 and commit subject line for each head. I see the commit sha1, however, I don’t remember each commit time.

Git pathspec error – archive

I have a problem with git archive Here is the Syntax git archive -o Name.zip 5a5e099 $(git diff –name-only 5a5e099^..5a5e099) Error: fatal: pathspec ‘-‘ did not match any files I have 2 Branches Master And Newsletterdesign I need the differences from Newsletterdesign, but get this error message. Thanks for your help Greetz chris

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