How do I add a global gitignore to SmartGit/hg?

I created a global .gitignore file (see https://help.github.com/articles/ignoring-files#global-gitignore) but how can I make this used for all my projects in SmartGit without adding it to the repositories?

Is there a short way of addressing branches in Git?

Is there a shorter way of referring to branches other than typing out their full name? How would it, for example, look when used with the git checkout command? To better understand the problem I’m having imagine a repository with around 50 branches with names such as: /feature/SOMECONSTANT-789738-And-a-very-long-description-copied-from-the-ticket-title Such branch names are generated by tools […]

Git: Discard all changes to a single file since a certain commit

I want to “undo” all local changes to one specific file, i.e. return to this file’s state at origin/master: if it existed and was modified => revert to old version. if it was added => delete file. if it was removed => re-add file. if it was renamed => rename back to old name. etc. […]

Submit new/fixed code to an existing Gerrit branch after review

How do I submit a new ‘Patch Set’ to an existing Gerrit branch that’s been reviewed? When I log into the review website, I am given a chance to copy checkout/pull/cherry-pick and patch commands.. I tried the checkout command to get the code into my local workspace: git fetch http://website/project refs/changes/##/####/# && git checkout FETCH_HEAD […]

Sync between laptop and PC for eclipse projects

I work on eclipse IDE mainly for php and java. I own a PC and a laptop both of which I need to use for coding. Now how do i sync code ad resources between two instances of eclipse between these two I think SVN and git are overkill for this. I own a portable […]

How to bundle install a git gem behind a proxy?

I am behind a proxy and I have a git gem in my Gemfile. How can I configure bundler to use git with the appropriate proxy parameters? I already have $http_proxy appropriatelly set, as well as my .gemrc . Still, it doesn’t work.

Is there a light-touch way to alter a single file that was accidentally committed?

I made a commit containing ten files recently. One of the files shouldn’t have been committed: it has my local test changes that won’t work for anyone else. I’d like to check out that file from a previous commit, then re-commit it as the original, then reapply my changes locally. git revert sounds good, but […]

How to add a folder to the .gitignore

Maybe my Googling skills are lacking but this seems like a question that should give me back thousands of hits and yet, I can’t find a straight answer. Simple as this: I do constant pushes to github to share with a remote developer. We both have npm and bower installed. No need to push these […]

How is Git's ‘log filename’ implemented internally

I know that Git doesn’t store data as a series of changesets or deltas, but instead as a series of snapshots. So there isn’t a direct relation between the two versions of one file, as shown: When I use the command: git log test.txt How does Git find the ‘version 1 and version 2’ log […]

GitHub: Is it possible to have a repository out of repositories?

I store my php projects under an private GitHub account. Now for example I have different components (news bundle, user bundle, etc.) and one project which uses all them together (e.g. custom website). Can I somehow symlink them? Or should I only use component repositories? Regards EDIT: There most be an easy way to do […]

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