Aborting a merge in git – Best practice

Say you are in a branch topic, you have been working for a while and want to merge in some commits from master. You run git merge and there are a few conflicts. But you don’t have time to resolve the merge conflicts now, and you want to return to the state that you were […]

Team Foundation Server 2013 Express – Can't connect to git repo via command line

I’ve setup an install of TFS Express 2013 on my build machine. I can connect via web and Visual Studio 2013 just fine with my domain credentials (NTLM), however no 3rd party tools or command line tools can authenticate. When entering in my credentials on the command line, all I get is fatal: Authentication failed […]

Git – Problems with Interactive Rebase and Squashing

I know there are lots of questions on SO about this, but I can’t seem to find the answer I’m looking for at all. I just merged my task branch into my master, and I am ready to push my changes to the remote master branch. However, they are displaying as two commits: commit 878c07412aab6a6b06b7fc8dd84c2418cc4f31d8 […]

Problem with git push and entering password

I’ve just setup an account on bitbucket and trying to import my repository for the first time. I type this command: git push -u origin –all Then I am prompted for my password. When I hit enter a new line is inserted and nothing happens. I can also see my password on the screen. For […]

Git: regular merge/rebase of long-living bugfix branches to master

Context We use several git repositories with the same workflow, involving two branches, and are wondering how best to “synchronize” commits from one to the other. Put simply, our git repositories contain: Long living branches Two branches: master (branch for ongoing development) 1.0 (branch for bugfixes only, to maintain a stable version) Both branches are […]

git diff on a bare repo

I wanna see how much a repo changed in the last month on gitlab server side cd /path/to/my/bare/repo.git/ git –git-dir . diff –shortstat “@{1 month ago}” fatal: Unable to read log ‘logs/refs/heads/master’: No such file or directory However it works fine in local checkout-ed working branch. Is there a way to do this without too […]

Add conditional logic after “git submodule foreach”

I am working on a script to update submodules for various projects in a CI environment. The single script needs to take care following three cases: Project that always needs master branch of the submodule. Project that has reference to specific branch of the submodule. Project that has reference to specific commit of the submodule. […]

running git reset –hard manually

Is there a way to perform the operations of git reset –hard manually — either through direct bash commands, vim editing, or even just “lower-level” git commands? EDIT: I removed many extraneous details unrelated to original question (which is probably why this was closed as too localized 🙂 ).

Git, tell me when a remote branch that I am tracking is removed

Is there a good way to see when or all local branches which has been setup to track a remote branch where the remote branch has been removed? example. I track the remote branch hotfix and it is removed on remote (usually due to being merged into dev). I would like to see this somehow […]

Unable to commit to an empty git repo

I have created an empty Git repository in Atlassian Stash and cloned it. $ git clone http://me@myrepo/my/repo.git … warning: You appear to have cloned an empty repository. Then I’ve created some files, added them via git add and wanted to commit via git commit. I get the following error: ERROR: Unable to determine active branch […]

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