git

Hosting Git Repository in Windows

Is there currently a way to host a shared Git repository in Windows? I understand that you can configure the Git service in Linux with: git daemon Is there a native Windows option, short of sharing folders, to host a Git service? EDIT: I am currently using the cygwin install of git to store and work with git repositories in Windows,...

Best practices for using version-controlling on Cocoa projects

Hi, I recently started using Git as my version control system for some Cocoa projects I'm working on and wondered if there are best practices for working with version control systems on Cocoa projects. There is the obvious "build" directory which I exclude from versioning as it's not important and can change quite a bit when debugging ...

Pushing an existing Git repository to Github only sends about half the commits?

I have a local Git repository I've been developing under for a few days: it has eighteen commits so far. Tonight, I created a private Github repository I was hoping to push it to; however, when I did so, it only ended up pushing eight of the eighteen commits to Github. I deleted the Github repo and retried, with the same result. Any tho...

Git thinks I am rewriting one of my files everytime I make a small change

I have a medium size Java file. Everytime I make a change to one of my files, BuildTable.java, Git reports it as a massive change, even if is only a line or two. BuildTable.java is about 200 lines and the change in this commit only changed a single line. git-diff ouputs this: --- a/src/BuildTable.java +++ b/src/BuildTable.java @@ -1 +1...

How to combine two branches from two different repositories in a single repository?

The structures of my Git repositories look like this: A-B-C-D-E-F # master branch in separate repo1 A-B-C-D-E-G-H # master branch in separate repo2 A-H are simple commits. As you can see the repositories are related (repo2 is a fork of repo1). I'm trying to combine these two repositories in one. Afterwards the single repository sho...

Modified files and git branches

Hi, I am working on a git repository with a master branch and another topic branch. I have switched to topic branch and modified a file. Now if I switched to master branch that same file is shown as modified. For eg: git status in git-build branch: # On branch git-build # Changes to be committed: # (use "git reset HEAD <file>..." ...

Best Practice for following Subversion repository Trunk: Git (Mirror), Git-Svn, Subversion?

I want to checkout, and then update as necessary, the Django Subversion trunk on a Mac OS X Leopard 10.5.5 machine. I am only interested in having updated Django code on my Mac. I am not interested in contributing patches to the Django project. I do not need the Subversion history for the Django trunk. I plan to use Git as the DVCS/SC...

Collapsing a git repository's history

We have a git project which has quite a big history. Specifically, early in the project there were quite a lot of binary resource files in the project, these have now been removed as they're effectively external resources. However, the size of our repository is >200MB (the total checkout is currently ~20MB) due to having these files pr...

How do you use Source Control without IDE integration?

I am currently using Subversion as my Source Control system, mainly because I found ANkhSVN to be a quite nicely integrated into Visual Studio. But many people seem to be using Git or Mercurial and others with great success. Now, I am wondering how to use a system like Git without some sort of IDE integration. Going to the command lin...

How do I push amended commit to the remote git repo?

When I've worked a bit with my source code, I do my usual thing commit and then I push to a remote repo. But then I noticed I forgot to organize my imports in the source code. So I do the amend command to replace the previous commit: > git commit --amend Unfortunately the commit can't be pushed back to the repository. It is rejected l...

How do I view 'git diff' output with visual diff program?

When I type 'git diff', I want to view the output with my visual diff tool of choice (SourceGear diffmerge on Windows). How do I configure git to do this? ...

Cygwin + git permission problems when trying to create a commit message

When I try to commit the first revision to my git repository (git commit) from Cygwin, I'm getting an error in gvim which says "Unable to open swap file for "foo\.git\COMMIT_EDITMSG" [New Directory]. I think it might be some sort of permission problem, but I've tried removing the read-only flag from the folder, as well as recursively adj...

Is there a way to add a specific version of a file to the git index?

The reason I am asking this is that I had accidentally done a git commit -a that included a file I did not yet want to commit. My solution was to do the following: git reset --soft HEAD^ git reset -- file/with/changes_not_to_committed git commit -C HEAD@{1} Here, I’ve rewound the branch by one commit while keeping the index and workin...

Git - Switching branches (windows) & uncommited changes

I'm having a hard time understanding some git/DCVS concepts. Here's what happened: I created a git project, and imported it from an SVN repo I made some commits I wanted to experiment something, so I created a branch called constants-update I switched to constants-updatebranch, moved some files, deleted others and added many more I com...

How do I import svn branches rooted in different directories into git using git-svn?

I have an SVN repository structure like below. We are using multiple levels under branches for various release maintenance branches, plus a directory for feature branches. git-svn init seems to work with a single --branches argument, i.e. it seems to expect all of the branches to be in a single location. trunk branches 1.1 1.2.1 ...

What do I need to read to understand how git works?

I would like to understand the way git works from a architects point of view. How are files stored, how are versions kept and how do changes happen (branches, merges, etc.)? I am not searching for information how to use it. (I already found a lot of pages with tutorials.) But I did not find any "behind the scenes" details, that would ma...

Gitosis: setting repository config variables

Is there a way to set repository config variables through the gitosis conf instead of going into each repository and editing the conf values directly? ...

Best practice for maintaining updated Git binaries (Git by Git) on Mac OS X 10.5?

On my Mac OS X 10.5 (Leopard) machine, I have installed Git 1.6.0.2 using the git-OSX-Installer from Google Code. The installer installs Git to /usr/local/Git. I would now like to keep up with the latest stable Git release (Master branch), currently 1.6.0.3. Can I run "git clone git://git.kernel.org/pub/scm/git/git.git" from within the...

How can I see what changes have been made in a git repository without pulling it into my working tree

For example, I could just git pull and then git checkout HEAD-1. But is there a way of seeing the differences before deciding whether to git pull or not? ...

git: how to merge commits from a remote to a different path?

I have a git repository with remote foo. foo is a web app, is contains some files and dirs directly in its root: Rakefile app ... public script My main git repository is a larger system which comprises this web app. I want to pull the commits from foo, but I need the files to reside inside the web dir. So they should become web/app, ...