git

How do I get just the head from gitosis?

I have gitosis running on my server. My build system needs to get a copy of the code from gitosis. Right now I clone the whole repository, which takes a long time. How do I get just the head of a branch? (I've tried git archive, but can't seem to get an archive from gitosis.) Can I create an archive from a bare repository? ...

Bash/Shell Script Function to Verify Git Tag or Commit Exists and Has Been Pushed to Remote Repository

I wanted to get this question out there to see if I'm doing this right. The following script works except for checking to see if the commit has been pushed to a remote repo which I can't find the right command for: #!/bin/bash set -e # fail on first error verify_git_ref() { log "Verifying git tag or commit: \"$1\" ...." ...

Set up git so the repository only contains the latest of certain blob files

Is there away to make git only retain the most recent version of certain blob files without keeping any history on the blob? I have a huge data set that my project relies on, but no one cases about the history of it only that it is part of the project and that they are useing the most recent data set. Thanks. ...

understanding git fetch then merge

Coming from an svn background, I had this question: http://stackoverflow.com/questions/1138990/git-equivalent-of-svn-status-u (what is the git equivalent of svn status -u) And I understand, you do: git fetch git log ..origin/master But, I'm guessing the origin/master part depends on the branch? It wouldn't necessarily be master if ...

understanding git cherry-pick

Coming from an svn background: I hardly ever branched, due to the (lack of) speed of switching and the hour or more it took to merge branches back into the trunk. Sometimes, if I needed to hotfix a problem on a web site, I'd make the change in the trunk (which would live along with previous changes or new features) and then go to that f...

Zip latest committed changes only

Git has the very handy archive command which allows me to make a copy of a particular commit in a .zip archive like so: git archive -o ../latest.zip some-commit This will contain the entire working tree for that commit. Usually I just need the changed files since a previous release. Currently I use this to get those files into a zip: ...

Mercurial <--> git cheat sheet?

Is there a cheat sheet or wiki page out there which relates hg commands to git commands, and vise-versa? I'd like to know for two reasons: first, I'd like to be able to translate git-speak[0] into Mercurial, and second I'd like to be aware of the subtle differences between similar-sounding commands (eg, hg pull and git pull). [0]: case...

Git authentication over apache_mod_krb

I'm using git repo with git-http-backend. In apache2 I have location what needs authentication for clone and push actions. When I protected it location with AuthType Basic all works is fine, git passes authentication and can clone and push, but if I change type to KerberosV5 git can't access to repo with correctly credentials. If I'm us...

How to run Ruby and GIT commands in one place on Windows

I have Ruby and GIT installed on my windows box. To run GIT commands I am utilizing the GIT Bash. To run Ruby commands I am using the command line. I have not been successful running GIT commands from the CMD line nor can I seem to run Ruby commands from inside the GIT Bash. I would love to be able to run commands for both GIT and Ruby ...

Hudson + Windows + GitHub + Git Plugin = really really slow fetch stage

I'm setting up my first Hudson + Git project (previously done many with Hudson + SVN). I expected the clone stage to be slow, as our repository is quite large, but subsequent builds where a fetch + merge is being used are just as long. The following options are enabled: Merge before build Clean after checkout I am not doing a "Wipe o...

redefine a sequence of little commits into a logical unit commit

In some settings, I am used to using git locally, and then exporting a diff which is then submitting with a detailed description. Thus, when I develop locally, I commit constantly, and don't bother with meaningful commit messages or perfect testing before committing. However, when using git to publish code on github, I would prefer to e...

Version control for reports (git)

I have a particular report that I am asked to run from time to time. The details are slightly different each time - different date ranges, different selection criteria - but structurally, the report is fairly stable. I do make some structural changes from time to time, however. I have two hopes for these reports: 1) to be able to rep...

Git - merging from remote to local branch when updating same file

I have a local branch that is tracking of a remote branch on git. At some point I update file 'x.out', but while working on this branch I try to pull from the server latest changes. Somebody else already updated 'x.out' and git tells me that "cann't overwrite file" (or so) so I must add my changes to the index and ALSO commit my change b...

delete first git commit

I made a mistake when I first committed. I'm on another person's computer and pushed a version with their user.name instead of mine. How can I delete this? ...

github: No supported authentication methods available

i use github and have successfully added and synched files on my laptop in the past. as of recent i started getting "PuTTY Fatal Error: Disconnected: No supported authentication methods available" after running: git pull origin master (or push) however ssh [email protected] returns the correct response: ERROR: Hi username! You've succe...

Git for Windows - The Program can't start because libiconv2.dll is missing

Hi, When I attempt to run certain commands (like git push, for example) from a git Bash on Windows 7 (64bit) I get the error: The program can't start because libiconv2.dll is missing from your computer I have searched exhaustively for a solution to this. The most I can find is an issue thread at the google code site (Issue 419) and a...

Searching for commits which reference a given object

I've got a file that's been installed on my system that is known to be part of a git repo. I'd like to find out which commit(s) (re-)introduced that version of that file, ie which commit is responsible for putting the file in its current state. I know that the file is in the repo because git show $(git hash-object $the_file) works. At...

gitosis + git error: fatal: '/home/git/repositories/idea-generator.git' does not appear to be a git repository

I have tried to follow the instructions on how to use gitosis to manage my git projects. Other than one slight issue, I have installed gitosis successfully. The problem arises when I try to create my first git project (after having set-up and configured the project through gitosis). I get the following error when I push to the remote gi...

How safe is "git" with an unreliable connection?

I am using git for source control and push my changes to a repository on a server on the internet for safe keeping. I can do some small amounts of coding on a laptop on a train, which has a wifi internet connection but it's not that reliable and occasionally drops out or becomes unusable slow. My question is what happens if my connectio...

Is there a good git client for Mac OS X that has all the bells and whistles of Conerstone or Versions for Subversion?

I am wiling to pay good money for it if it has all the most common features and polished look. Also, I've seen gitx and I am asking if there are any other GUI clients besides gitx. ...