git

git patch ignoring white space diffs c++

The only thing I care about is C++ file. (Don't worry about binary files, text, etc ... you can assume taht everything is C++ code_). I have these branches: * dev master Now, I can to create a new branch "magic", where branch magic is equiv to "dev" (in terms of C++ code generated), but minimizes useless whiteline diffs (like inser...

Why should I use core.autocrlf=true in Git?

I have a Git repository that is accessed from both Windows and OS X, and that I know already contains some files with CRLF line-endings. As far as I can tell, there are two ways to deal with this: Set core.autocrlf to false everywhere, Follow the instructions here (echoed on GitHub's help pages) to convert the repository to contain onl...

Is it acceptable to delete a public git fork and replace it with a different fork?

If you delete a public git repository, and then replace it with a different one, can that cause complications? Background: A while ago, I branched a project and made a few commits, which have either been pulled in or have become irrelevant (but the latest commit of my fork isn't an ancestor of the main repository). I'd like to delete my...

Git + SoA, one repo or many?

Normally, when I start up a new application, I'd create a new git repository for it. That's well accepted and plays nice with Github when I want to share my code. At work, I'm working in a service oriented architecture. One very common pattern is to add some code to two different applications at the same time - perhaps adding a model ...

git problem: made mistake with creating branch and cannot push to master anymore

I did git checkout -b foo origin/master git push origin foo to create a branch and push it to the remote repo. This is obviously the wrong way to do it (I'm a git beginner). But apart from being wrong, it created a much more serious problem: Now we cannot push to master anymore! Deleting the new branch ("foo") doesn't help. Cloning a...

git doesn't show where code was removed.

So I was tasked at replacing some dummy code that our project requires for historical compatibility reasons but has mysteriously dropped out sometime since the last release. Since disappearing code makes me nervous about what else might have gone missing but un-noticed I've been digging through the logs trying to find in what commit thi...

How can I prevent git push if local modifications are detected (including untracked files)?

Sometimes someone on our team does a git push and breaks the build because his local build works but he has forgotten to commit all his local modifications and untracked files to git before he pushes. I'd like to prevent this... I poured over the docs for an hour or so today and couldn't find anything built in. Does anyone have any sol...

Using TortoiseHg to push to an authenticated git repository

I'm trying to push a changeset from a local Mercurial repository created with TortoiseHg to a remote Git repository. I have hg-git installed and configured and it will pull just fine. But when I run the push it gives me this Command hg push git+ssh://git@dummyrepo:username/repo.git Result pushing to git+ssh://git@dummyrepo:username/...

Git. Remote HEAD is ambiguous.

I checked the relevant thread but still can't solve this problem. When I typed "git remote show origin", I got * remote origin Fetch URL: xxxx Push URL: xxxx HEAD branch (remote HEAD is ambiguous, may be one of the following): development master Remote branches: development tracked master tracked Local b...

Git - How do I manage built files in different branches?

Some Background I have been using Git for a while now. The projects that I have been working on have not been too complicated in regards to branches/tags. I have decided to use git-svn at work. The SVN repository has many different branches. A lot of these branches are customer customized versions of the trunk. The Problem I often wo...

Msysgit bash is horrendously slow in Windows 7

I love git and use it on OSX pretty much constantly at home. At work, we use svn on Windows, but want to migrate to git as soon as the tools have fully matured (not just TortoiseGit, but also something akin the really nice Visual Studio integration provided by VisualSVN). But I digress... I recently installed msysgit on my Windows 7 m...

git-svn: reset tracking for master

I'm using git-svn to work with an SVN repository. My working copies have been created using git svn clone -s http://foo.bar/myproject so that my working copy follows the default directory scheme for SVN (trunk, tags, branches). Recently I've been working on a branch which was created using git-svn branch myremotebranch and checked-out u...

Git: Help an SVN novice translate trunk/branch concepts to Git

So I am not much of a source control expert, I've used SVN for projects in the past. I have to use Git for a particular project (client supplied Git repo). My workflow is as such that I will be working on the files from two different computers, and often I need to check in changes that are unstable when I move from place to place so I c...

Is it possible to determine if two git branches will merge cleanly without affecting the working directory?

You can determine with git merge-base if a fast forward is possible, but is there some git trick to determine if two branches will merge cleanly with some strategy without actually doing the merge? I know about "git merge --no-commit --no-ff $BRANCH" but that affects the working directory, which I'd like to avoid since this is part of a...

svn cat for git

I am looking for the equivalent of svn cat in git. Yes, I am aware that the similar question was asked here. The answer is to use git show rev:path. However, svn cat can be used for the remote repository. That is, I can do svn cat url@rev and get the file from the specified revision of the remote repository, without getting the whole r...

Git history - find lost line by keyword

I had somewhere in my Git repository a line containing word "Foo" a couple hundreds commits before. If there is any way to find its revision number where it was the last time without buying FishEye? ...

How to migrate out of designsync to git/hg/bzr/svn?

design sync uses RCE as a backend store. RCE is supposed to be the next version of RCS. Does anyone has any experience with migration of design sync or RCE to any of the newer version control system? ...

git stash blunder: git stash pop and ended up with merge conflicts

I did a git stash pop and ended up with merge conflicts. I removed the files from the file system and did a git checkout as shown below, but it thinks the files are still unmerged. I then tried replacing the files and doing a git checkout again and same result. I event tried forcing it with -f flag. Any help would be appreciated! chirag...

SSH is looking in the wrong place for the public/private key pair on Windows

I'm trying to configure GIT on my Windows XP machine, but SSH keeps creating and looking for the public/private key pair in non-sensical places, e.g. /.ssh/id_rsa Is there a configuration file in the GIT Installation for Windows where I can switch this to my home directory, or another user defined place? By default, it offers to create ...

github repos cloning, but no tags/branches recreated?!

I've been cloning a few repos from github that, even though I know they have branches/tags, do not have them once I clone them onto my local drive. strange. I try to list the tags (git tag) but nothing comes up... I would look into .git/refs/tags/ and that too is empty. the repos in question are: http://github.com/jchris/hovercraft.gi...