git

Synchronizing Git repos across machines without push

I've got three computers which should have the same settings for all their applications. Since all of them have processes running using those settings, I never want to push, instead I'd like for each of them to track the other two, and pull only when I'm logged in. After working a couple of days on this, all the articles I've found seem...

Migrating a svn repo to git. Multiple app in svn repo need to broken into separate git repos.

I have a svn repo with various apps as subdirectory of a single svn repo. That worked because I could have checked out a partial, repo. As I cant do that with git obviously I need multiple repos. I want to keep my commit histories in the git export. What is the simplest way to do this? ...

Get the longest non-glob string at the start of a string

I'm trying to create a script to convert from $GIT_DIR/info/exclude to .gitignore files. I'd like to put the .gitignore files as close to the pattern target as possible, meaning that a glob like /a/b/*/*.c should be put in /a/b/.gitignore. To do this accurately, I need something which can return the longest substring from the start which...

Can't invoke git-svn from command line

Hello, I just installed git on my linux machine (Kubuntu distro) by running the following command: sudo apt-get install git-core git-doc gitweb git-gui gitk git-email git-svn I would like to migrate a project which currently uses subversion to git. But if I run git-svn I get the message : git-svn: command not found Any way to fix th...

How to Diff Files Directly from the Linux Kernel GIT Repository?

I'd like to be able to diff files / directories directly from the Linux Kernel GIT repository without having to download full source. Specifically, I'm interested in two potential solutions: The ability to do diff's via a web browser ( firefox ) A GUI utility for Ubuntu that can do remote diffs. A tutorial how to setup option #2 Edi...

Appropriate strategy for tagging and hotfixing with git

I was wondering if the strategy I'm using for tagging and hotfixing tags (which then I use for deploying rails applications) with git is appropriate. For tagging I just tag a commit of the master trunk. If it happens I have to hotfix the tag, I'm checking out the tag (e.g. 1.0), fix the issue, commit it and re-tag it (e.g. 1.0.1). Now,...

git confusion - cloning a repo is returning a past version

Hello Im having some confusion with my git usage. I cloned a repo from one comp to the other, and the new clone is the state of the original that was active some time ago. So its cloning a past version. when I do 'git log -n1' to see what the latest commit info of the new repo (the clone) it matches the original repo that I cloned (the...

Is it wise to use branching with one-man git project?

I have a small project on git, on which I am the sole developer. For now, I used only one main branch to actually get it working. Now the project is somehow working and I would like to just implement some new features. The question is, should I create new branch for each new feature and merging it back afterwards? The fact is, my work...

git: Move a file/directory but still merge changes easily?

I've read in various FAQs that git doesn't explicitly track renames/moves, preferring to look for identical (or in some situations similar?) files. That's great, but will it cope with this situation: a friend's remote repository has a new feature (i18n) involving some new files at debian/po/*.po. I have my own fork of this project, and w...

[git] 'git pull origin mybranch' leaves local mybranch N commits ahead of origin. Why?

I just observed something odd about git pull, which I don't understand. On Friday, I worked on a local branch. let's call it mybranch. Before leaving the office I pushed it to origin (which is my github repo): git push origin mybranch. Yesterday at home, I pulled mybranch to my laptop, did some more coding, and then pushed my changes b...

How are git branches imported into mercurial with hg convert?

I have a number of branches in a git repository: david@Panama ~/app: git branch -r origin/HEAD -> origin/master origin/master origin/newButtons origin/newFonts origin/serverView If I try and import this git repo into mercurial: david@Panama ~/: hg convert app ... david@Panama ~/app-hg: hg update 388 files updated, 0 files merged, 0...

git commit problems

I just commited my working tree, added to index first, with "$git commit -m 'test'" I saved the stdout-put from this to a file and I see at the top of it that it says # On branch master # Changed but not updated: # (use "git add/rm ..." to update what will be commited) # (use "git checkout -- ..." to discard changes in working dir...

Gitosis Directories of repositories per user?

I was just wondering, is there a way to set up gitosis so that a user would have their own directory to which they could push any number of repositories that they want, and essentially have admin privs on that directory? This might be kind of confusing, but essentially I want something like how on github all your repositories are accessi...

How can I find out which files have been modified in a branch?

I have two branches: master and bug1. I checked out bug1, did bunch of changes and multiple commits. How do I get a list of all files that were changed on the branch? I'm not interested in hashes, dates or any other commit related details. I just want to get a simple list of touched files. ...

Unable to chdir() on Git/Cygwin

Hi all, I installed Git via Cygwin on Windows Server. It works out very well. However there's a small issue that when I clone a repo use the command as following: $git clone git@myserver:project.git I always got the "unable to chdir()" message but if I typed in the full path then it works $git clone git@myserver:/home/git/repositori...

Eclipse git checkout (aka, revert)

Is it possible to do the equivalent of git checkout from within Eclipse using the EGit plugin? I have a file that's been modified. I want to discards the changes and revert the file back to what's in the source repository. In Subversion this is called revert. In git the equivalent is checkout. I can't find any menu item under Team that...

git grep --cached

Am I misunderstanding how git grep --cached foo works? Running git version 1.6.4.4 or 1.6.5.2, git grep --cached foo returns exactly the same thing as git grep foo. I thought it would work like git diff --cached, searching only changes in the staging area. That's certainly what the man page leads me to believe: --cached Instead o...

Is there a significance in merge directions between upstream/topic/integration in git ?

I have read the Packaging Software using git article until my eyes are sore, as I can see from this image, it recommends merging from upstream->topic branch->local integration branch. I am specifically interested in the scenario where there are conflicts between upstream branch and local integration branch. If I am at all reading the ar...

Git tool to remove lines from staging if they consist only of changes in whitespace

The point in removing trailing whitespace is that if everyone does it always then you end up with a diff that is minimal, ie. it consists only of code changes and not whitespace changes. However when working with other people who do not practice this, removing all trailing whitespace with your editor or a pre-commit hook results in an e...

How to create branch for the single file?

Hi community, I have a product which comes in two versions, and up to now I was able to manage the differences between them only using compiler flags and #ifdefs. Now I want to have a separate icon for each of the product. The rest of the codebase, including source referencing the icon file remains the same. I want to keep these develop...