git

What's the equivalent of use-commit-times for git?

I need the timestamps of files on my local and on my server to be in sync. This is accomplished with Subversion by setting use-commit-times=true in the config so that the last modified of each file is when it was committed. Each time I clone my repository, I want the timestamps of files to reflect when they were last changed in the remo...

how to use tags in GIT

A tag in GIT from what I understand is just marking a particular commit with a name. So say I release version 1.5, I create a tag 1.5 Now if a customer finds a bug, how do I go and 'checkout' that 1.5 codebase to my working directory? I guess that I would perform the bug fix, then create another tag like 1.5.1. Then I would potential...

git is saying LF will be replaced by CRLF

Running git on a windows xp machine, using bash. I exported my project from SVN, and then cloned a bare repository. I then pasted the export into the bare repositories directory, and did a: git add -A I then got a list of messages saying: LF will be replaced by CRLF what is the ramifications of this conversion? This is a .net solu...

Git command to display HEAD commit id?

What command can I use to print out the commit id of HEAD? This is what I'm doing by hand: $ cat .git/HEAD ref: refs/heads/v3.3 $ cat .git/refs/heads/v3.3 6050732e725c68b83c35c873ff8808dff1c406e1 But I need a script that can reliably pipe the output of some command to a text file such that the text file contains exactly the commit id...

Git: Getting the difference between two repositories

How can we get the difference between two git repositories? The scenario: We have a repo_a and repo_b. The latter was created as a copy of repo_a. There have been parallel development in both the repositories afterwards. Is there a way we can list the differences of the current versions of these two repositories? ...

GIT undo a commit that isn't the most recent, rebase all commits since.

Earlier on, I committed some code which at the time seemed like a good idea, but in fact it made things worse. I'd like to remove the change from the history as it is not helpful, and rebase all commits since - they should all merge without issues. I tried creating a new branch (called newMaster) immediately before the bad commit (with ...

Best workflow with Git & Github

Hey guys, im looking for some advice on how to properly structure the workflow for my team with git & github. we are recent svn converts and its kind of confusing on how we should best setup our day-to-day workflow. Here is a little background, im comfortable with command line and my team is pretty new to it but can follow use commands. ...

.gitconfig error

I edited my .gitconfig file to add support for LabView and it appears that I did something that Git doesn't exactly like. The problem is it (Git) doesn't tell me what it doesn't like. What did I do wrong? The error message doesn't help much either: "fatal: bad config file line 13 in c:/Users/Tanner/.gitconfig" [gui] recentrepo = C:...

Problem converting git to mercurial

I'm getting an error trying to convert a git repository to mercurial. When I run: hg convert gitdir hgdir I get this: UnboundLocalError: local variable 'tz' referenced before assignment Background: I just installed TortoiseHg and enabled the convert extension. It looks like nmercurial convert is having a problem with the gi...

Git Workflow Best practices

Hello All, Stupid question and treat me as completely a newbie to version control. I'm new to Git (I've used subversion before, but just the basics) I understand the basics of Git and its branching commands, I have an imaginary situation that need your advice. Suppose my software currently is at v1.2, stable and released. My Softw...

How to "git show" on a remote repo?

I'm trying to hook my git repository with Microsoft's Source Server feature such that people debugging into my binary will automatically pull source files down from github.com. The git show command will get me the right file and version that I need, but since the debugger is not running on a computer with a local git repo of the proje...

does Java have API wrappers around subversion and Git?

Curious if there any API wrappers for Git and Subversion for Java? I want to be able to pullup the changesets and souce code (and diffs) from Subversion and Git repos. Is this possible? Any pre-built APIs? ...

Git Won't Un-Ignore a Directory

I'd like to only track certain directories in git in a larger project, where most directories will be excluded and only a few will be tracked. So, I wanted to use the not-operators in my .gitignore or excludes file, ja? Why is this happening: % mkdir wtfgit % cd wtfgit % git init Initialized empty Git repository in /home/foobar/wtfgit...

Gettings errors with Textmate using Git bundle.

Trying to use Textmate with the Git bundle. Running into errors when trying any option. /Users/colby/Library/Application Support/TextMate/Bundles/Git.tmbundle/Support/tmvc/../lib/git.rb:131:in `paths': No selected files. (RuntimeError) from /Users/colby/Library/Application Support/TextMate/Bundles/Git.tmbundle/Support/tmvc/../lib/git.rb...

Working with Git in Visual Studio 2010 beta 2

GitExtensions doesn't yet support 2010. What do I in the meantime? I want something that handles moving/renaming files from within the IDE, similar to Ankh for SVN. ...

Get number of revisions on a file with GIT

Hey all, I'm just starting out with Git and I'm looking for a way to get the number of revisions a file has undergone. Right now I'm using the command: git diff master~(arbitrary number) main.js How do I know how high I can go with this number? I would also like to obtain the dates for each revision as well.. Thanks! ...

git submodule problems

Hello everyone I'm trying to add a submodule to my git repo, and Im getting this error in return: remote origin does not have a url defined in .git/config any ideas about what this might be? I tried googling for it but only one vague link comes up I'm doing this: git submodule add ../extern/Lib1 lib I'm expecting this to c...

How to view complete commits when tracking history of a single file in Git?

I have a Git repository with about a two years of history in it. I have single file in it, for which I wish to find all the commits, and for each commit: all the other files that were committed in it. Let's assume this file is named file.txt. I can run gitk with this file as argument: gitk file.txt and I do get each commit. However, b...

How should git behave when two links to same file are different?

I observed the following behavior while working with the perl code base (on branch maint-5.004): bash-3.2$ git status | grep modified # modified: configure bash-3.2$ git reset --hard HEAD is now at 9a4fb7e copy over bleads .gitignore bash-3.2$ git status | grep modified # modified: Configure bash-3.2$ git reset --hard H...

Ivy setup with Git?

I've used Ivy http://ant.apache.org/ivy/ with SVN to manage dependencies for Actionscript projects in the past. The library I used was ivysvn: http://code.google.com/p/ivysvn/ It seemed to work pretty well, the svn repository hosted versioned binary .swc files for each Actionscript library and I would pull them down into individual proj...