git

GIT: move back to an old commit and merge that with master

Given a project with 2 files: fileA and fileB. Both were once added to a git-repository. Then I added fileA to .gitignore (and flushed the git-cache), so that in the current master only fileB is present. I would like to clone this repository to another machine now, but fileA is missing. The next thing I did was to create a branch from t...

Proper git submodule links

Because I don't want to spend +$12 for the simple-to-use github.com private hosting, I place a lot of my code libraries in small repositories on a shared hosting account. This allows me to have as many code repos as I want. Since those repos don't take any resources to sit there I also put a couple very light sites on that account to ma...

How do I determine which changes in one branch are missing from another?

I'm using git. I have a branch, apifixes, that was branched from master some time ago. Most, but not all, of the changes from the apifixes branch have been merged back into master. At least, I believe this is the case, because when I try to do git branch -d apifixes I get the following error: error: The branch 'apifixes' is not an...

git + partly shared files between branches/repositories. Is it possible?

One team in company I work for has the following problem. They develop an application, which will have different builds (e.g. different design depending on customer). so they have some code shared between builds, and some specific to build. E.g. first build has (example is meaningless about files, it is just to understand the problem; I ...

linking git and github repositories

I'm looking for a clean way to import one git repository from another, where both repositories exist on github. The two repositories are private, in case it matters. The idea is that one repository represents one project and the other simply needs to use that project. It doesn't make sense to check in all the code from one repository i...

How could I ignore bin and obj folders from git repository?

I want to ignore bin and obj folders from my git repository. As I've found out, there is no easy way to do this in .gitignore. So, are there any other way? Using clean solution in Visual Studio? ...

Lost Last Git Commit

I lost my last commit because I accidentally ran "git reset --hard HEAD^". Note: I didn't want to put the "^" at the end. Is there any way to get it back? It was 2 days of work :( ...

someone sent me to pull his changes . However I am not able to add my name to that commit

Someone forked my project and made a few changes. All good. All his changes are in a single commit. Now he asked me to merge his changes. Project is hosted on github. I followed the guidelines mentioned at http://github.com/guides/pull-requests and this is what I did git pull git://github.com/defunkt/grit.git master However because o...

"No SCM found" error on Coda.app with Changes.app plugin

I was trying to verify changes on a file between two commits. This works fine both in Espresso and Textmate but in Coda i always get this error "No SCM found". Can anyone suggest what to look for? ...

GIt integration for Coda app

Anyone can recommend a solution for this? ...

Safely using a shared object database in git

I have read in several places that it's possible to share the objects directory between multiple git repositories, e.g. with symbolic links. I would like to do this to share the object databases between several bare repositories in the same directory: shared-objects-database/ foo.git/ objects -> ../shared-objects-database bar.git/ ...

git: merge two branches: what direction?

Hi, We have the following situation: A --- B --- C --- ... --- iphone / ... --- last-working --- ... --- master Between last-working and iPhone, 32 commits were made. Between last-working and master, a lot of commits were made. What I want now is a new branch where I have iphone and current master merged to...

git: share the work of merging two branches

Hi, I want to merge to very diverged Git branches together. That will be a lot of work because they have several hundreds conflicts. What would be the best way, so that maybe also others can help me and also work on this merge? Normally, I am doing just the 'git merge ...' and then going through all conflicts, resolving them, then do ...

How to limit the subset of git commands that zsh will auto-complete (with tab)?

I have a combination of: autoload -Uz compinit compinit and autoload -Uz vcs_info It actually allows for a great amount of integration between git and zsh's tab completion. Too much in fact. How do I limit the set of commands, so that git che(TAB) will expand to checkout, and not to a choice between checkout and checkout-index? ...

Single or Multiple Git repositories for libraries shared between teams

I am looking at how/if I should make the switch from svn to git. I currently have a multi-layered set of projects in svn which are layered such that D uses C which uses B which uses A. Actual deployed projects like X,Y,Z use any of the common libraries A-D. The aim is for future projects and other teams to share the base libraries (A-...

Force git to add dotfiles to repository

How can I add files starting with dot (hidden files) in git repo? Git seems to always ignore those. When I type "git add .", dotfiles in GIT_DIR are added, but not from subdirectories. On the other hand, "git add subdir/.dotfile" won't work. I tried "git add -f" and putting "!.*" in GIT_DIR/.git/info/exclude. No luck. ...

dcommit to SVN in 1 commit after cherry-picking in git

I would like to know if there is a clean way to do git-svn dcommit of multiple local commits as 1 commit into subversion. The situation that I have is I am cherry picking some bug fixes changes from our trunk into the maintenance branch. The project preference is to have the bug fixes to be committed as 1 commit in subversion, but I wou...

List git branches that can safely be deleted.

If you do git branch -d branchname, it will delete branch name if it references an earlier commit in your history, or tell you that you need to use -D otherwise. I often create branches that are later pushed to master, and can thus be deleted by this criterion. Is there an easy way to list all the branches that point to earlier commits...

Script to remove history for all binary files in Git, without removing file itself

Say I have a huge git repository and it has a number of swfs and images in there. I want them to be included in the hosted github repository, but they don't need to be versioned, and I don't want to have to store them somewhere else. What is the simplest way I can remove their history every time I commit to a repository? ...Such that, ...

How to automate git to automatically clone a repro on the server?

Hi! I have a repro in which I want to push changes. I want to sync two repositories: ./pages.git into ./pages. My git setup on my development machine pushes into pages.git. But the web-application works with ./pages. git clone pages.git pages fatal: destination path 'pages' already exists and is not an empty directory. Well now I d...