Advantages of using public maven repository for libraries instead of local

What are the advantages of using Maven’s public repository vs storing your libraries locally? I see the following disadvantages in using public repository: If for some reason some library is updated my application will probably crash, considering I use hundreds of libraries that’s bound to happen sometime. If a specific library version is specified to […]

.bashrc not executed when starting GitBash

I’m following this guide, I’ve gotten to the part where I need to create the .bashrc file and it doesn’t seem to execute when I restart GitBash. I’ve tried a few things including the answers on this SO question. I’ve also tried just having an echo in it for testing, which works when I execute […]

How can I diff two branches in GitHub?

I am just wondering if there is a way to simply diff two branches in GitHub? I know GitHub has capacity to do it because when we do code-reviews it does list out all the diffs nicely. I was just wondering if there is a way to do it without any code review to compare […]

How to recover deleted git branch?

By mistake I deleted one of my git branches. Is there any way to recover it? I used the following command: $ git push :development I want to recover this branch. I am on the master branch and it doesn’t show any delete command is run: $ git reflog 1b716a1 HEAD@{0}: checkout: moving from master […]

Where should the credentials for mysql be put?

Logging into a mysql database requires credentials. I have these credentials in a PHP class called class.DBOne.php. This is in a git repo on a server. I use push to deploy. I want to share the repo with some contract devs, but I don’t want them to have access to the credentials. How do I […]

How can I un-do a git commit AFTER a git push?

From here http://blog.prabir.me/post/Undo-in-Git.aspx, it said This undo’s your commit and also resets your working tree to the last commit. 1 git reset –hard HEAD^ But how can I un-do my last commit AFTER I did a ‘git push’? Thank you. When I do ‘git log’, I get as my top commit commit 29fc764693a5933a379169e22891e4b0d3d2426f Merge: 002db49 […]

Exception “working tree already exists” while cloning GIT repo in pre-push hook

I try to clone my local git repository inside the pre-push script (client hook). I get the exception: fatal: working tree ‘…’ already exists. I don’t understand the exception, since i obviously clone the repo to a different directory. Any ideas? I tried that: unset GIT_DIR cd .. git clone ./TestTest/ /tmp/PrePushTestClone It fails exactly […]

Net Start SSHD HELPMSG 3534

I am trying to setup Git on a Windows box and so far all appears to be working … except this: net start sshd gets the error NETHELPSMG 3534 When I type cygrunsrv –start sshd I get QueryServiceStatus: Win32 error 1062 Any ideas how to fix this?

Merging two completely different repositories

I have a git repository (let’s call it A) which has quite some commits and tags in it. I recently created a new repository (let’s call this one B) and I did some commits in there (no tags, no branches other than master). After some work I realized that work in B could completely override […]

Generate the working directory files from .git directory

I have the .git directory, but I do not have the actual working directory, just the repo. What command can I use to recreate the working directory?

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