You are here

git

Put git into Verbose Mode

Using git as a versioning system is great, but sometimes you might get some cryptic error messages.
To help you on debugging put git into verbose mode directly in your command line, and only for each command you need. Here's how:


$ GIT_CURL_VERBOSE=1 git push

Cheers

HOW-TO fix Git repository corruption: Cannot obtain needed commit

When trying to clone a remote repository and you receive an error message that it cannot obtain need commit from server, it is very easy to fix this problem:

error: Unable to find ef999dd8a64814fb66f09e7020a6613b6de835f5 under http://example.dyndns.org/repo/example.git
Cannot obtain needed commit ef999dd8a64814fb66f09e7020a6613b6de835f5
while processing commit 23e99471bb05a6807e4d4fc3744ce864e7effeaa.
error: Fetch failed.

HOW-TO find out the remote GIT repository

It might happen that you have so may repositories on your local machine at once that it could get hard to remember which is the original remote repository or branch. The command in git to find this out would be:

git remote show origin

Cheers!

Update a Git Repository from local versioned files

If you are new to using Git as a versioning tool, you might make a common mistake whilst managing local files - I know I did.
When you start working on a cloned remote git repository (created from the git clone command) all the following commits (done by the git commit command) are executed on your local repository.
To upload the commits to the remote repository you need to perform a push command, like the following using ssh:

Setting up a git server on MacOS X Lion

Recently I found this nice tutorial on how to setup a git server on a Mac OS X Lion.
It goes straight to the point and you can setup the server using apache real quick!

Enjoy!

Update on October, 15th 2011: Since the referred website has been down a few times the past few days, I have added below the most important steps for setting up the git server on a MacOS X Lion.

Git for Windows

Just a quick one... if you need to use Git in a Windows Environment, simply download the msysgit installer and follow the instructions on screen.

Subscribe to RSS - git