git

Split large Git repository into many smaller ones

After successfully converting an SVN repository to Git, I now have a very large Git repository that I want to break down into multiple smaller repositories and maintain history. So, can someone help with breaking up a repo that might look like this: MyHugeRepo/ .git/ DIR_A/ DIR_B/ DIR_1/ DIR_2/ Into two repositories th...

Git autocomplete in screen on mac os

I've using git on mac and I have configured autocompletion as written at http://www.codethatmatters.com/2010/01/git-autocomplete-in-mac-os-x/ It works fine when I do it in pure terminal. But I prefer to use gnu screen program when working in terminal. And in screen when I press tab noting happen. Maybe someone knows how to fix it. ...

Git repository with git directory stored elsewhere

Hi, I'm sorry if this is a duplicate, I've searched google and SO and couldn't find anything similar since it's a fairly generic set of words to search for! What I want is to have the .git directory be outside of the working tree. I need to do this because it's a 'stealth' git repository inside a project using other version control sof...

git gui - can it be made to display UTF16?

Is there any way to make git gui display and show diffs for UTF16 files somehow? I found some information here: http://stackoverflow.com/questions/777949/can-i-make-git-recognize-a-utf-16-file-as-text but this is mostly referring to the command line rather than the gui. ...

GitHub fork of Apache 2.0 licensed project

I am developing open source project at github, licensed under apache 2.0 license. Somebody made fork of my project and added functionality that was not included in my project and it is licensed under apache 2.0 license as well. Can I merge changes from fork to my initial branch? My license headers contains: Copyright *My Institution* ...

Are merges in Git different than in Mercurial?

Hopefully, this isn't a loaded question. I'm a longtime user of hg, and it's meeting our needs quite well. Lately I have been working with a consultant and he keeps going on about 'managing several repos and pushing/pulling/merging them is easier' than hg. More specifically, I believe he means that pushing changes to a remote repo is ...

Git pull needs to discard local files

Hi all, I have a git setup with a shared repository. As I'm working on 2 PC's I push my personal branches. I'm rebasing frequently with the develop branch so I need to force a push (git push -f origin feature). But when I want to pull a feature branch whith the forced changes I always get merge conflicts. Is it possible to force a pul...

Read-only SVN mirror of a Git repository

Hello I want to use Git and Github for the development of a project. But college requisites says that I must use a SVN repo of their own. I think it should be possible to develop using Git–Github and use the SVN as a mirror of the Git Repo. Nobody will commit directly to the SVN repo, only to the git repo. My question is, How to I do...

gitignore and how to ignore a common directory name and its contents

I've been pulling out my hair researching the net and various docs about .gitignore files. I'm a bit of a n00b with Unix/Terminal (using Mac OS X) and I can't for the life of me figure out how to ignore a folder's contents (any kind of content, be it a file or another folder, no matter how deep it is). I'm working on a project that gene...

git-p4 vs git-svn

My company currently uses SVN for it's repository. In order to get better merging and local branches/revisions I've been using git-svn over a subset of the larger repository. My company was recently purchased and one of the services offered by the corporate mothership is centralized SVN or Perforce hosting. Given that neither Perforce...

Speeding up the initial git-svn fetch

I have a big repository, 100,000+ revisions with a very high branching factor. The initial fetch of the full SVN repository using git-svn has been running for around 2 months and it's only up to revision 60,000. Is there any way to speed this thing up? I'm already regularly killing and restarting the fetch due to git-svn leaking memor...

git diff - show me line ending changes ?

For some reason my editor looks like it is occasionaly changing changing the line endings of my source files. When I do 'git diff', all i get is a mysterious empty '-' followed by a '+', but no information to confirm this was teh actual change. How do I get git diff to show me what this change actually was ? ...

Git file rename

I wanted to rename a folder from "Frameworks" to "frameworks", but git would not let me add the new lowercase name. I guess it treats filenames case insensitive, does it? A git add frameworks/ -f didn't help ...

How to know if there is a git rebase in progress?

When I start a git rebase -i, I can issue commands like git rebase --continue, or git rebase --abort. Those commands only work if a rebase is in progress. How can I know if there is a rebase in progress? (I would greatly appreciate some details on how rebase works internally; what does git do to a repo that gives it the "rebase in prog...

How do I squash two non-consecutive commits?

I'm a bit new to the whole rebasing feature within git. Let's say that I made the following commits: A -> B -> C -> D Afterwards, I realize that D contains a fix which depends on some new code added in A, and that these commits belong together. How do I squash A & D together and leave B & C alone? ...

Saving Git SHA1 when building with Hudson similar to the CVS_BRANCH tag for CVS.

We have migrated from CVS to Git. Our Hudson build script used to save the value of the CVS_BRANCH environment variable in the generated build along with the Hudson BUILD_ID to allow for later investigation. I cannot figure out how Hudson (or the Git plugin) presents the Git SHA1 name of the current commit to the ant script, as I canno...

How can I setup git to checkout some files crlf, others lf?

I have a git repository which contains (among others) *.wse text files and *.sh text files. How can I setup git to always checkout *.wse files with CRLF line endings and *.sh files with LF line endings? ...

Git Windows Command Prompt gets stuck during Git commands with (END)

I've got Git for Windows setup (msysgit) and it was working fine for the last few days and today I've encountered an odd error. When issuing a Git command in the Windows Command Prompt or in the Git Bash that comes bundled with msysgit, I get a strange '(END)' line appear and then I cannot issue any other comamnds. At this point all...

Is there an internal alternative to gist.github.com to run behind a firewall?

gist.github.com is incredibly handy, but I'd like to be able run something similar for sharing code samples internally with other developers behind the firewall where I work, so I don't constantly need to be sanitising my code all the time, just to talk about code examples. Does anything like this exist? I'm not after big project manag...

Git ignore all files in directory expect for specified

My rails app uploads all users photos to a folder /uploads/photos/. I want to ignore everything in this folder in git except for one subfolder /uploads/photos/default/. Is this possible using the .gitignore file? ...