git

Refresh all files in buffer form disk in vim

the command to Refresh file from version on disk is :e! How can I do the same on all files in the buffer Background. I need that because I am using git with multiple branches with one vim open that contains a buffer. When I checkout to a branch, I would like to have vim to refresh. ...

What do edge colors mean in gitk?

I'm looking at git history and see various edge colors between commits: red, grey, blue, green, brown, etc. What do these colors mean? They seem quite random to me ... ...

How do I git rm a file without deleting it from disk?

The command removes the file in my system. I meant it to remove only the file from Git-repository. How can I remove the file from a Git repository, without removing the file in my system? ...

Making git "forget" about a file that *was* tracked but is now ".gitignored"

There's this file that was being tracked at one time by git, but now the file is on the .gitignore list. However, that file keeps showing up in git st after it's edited, so how would you force git to completely forget about it? ...

Integrator workflow, Is fetch-rebase-push safe for remote repos?

I'm managing a git repo using the integrator work flow. In other words, I pull commits from my co-workers, and push them out to the blessed repo. I'd like to keep the commit history linear for most cases, so is it OK to do a rebase instead of a merge when I integrate changes? Here is an example: git fetch coworker git checkout coworker...

Is there any way to set a flag by default for a git command?

I would like that whenever I run git diff or git show it silently automatically appends --ignore-all-space. Is there a way to do this? I know that I can create aliases like this: [alias] sh = show --ignore-all-space di = diff --ignore-all-space But I would like to use the diff and show commands directly. ...

Is there a way to tell git to only include certain files instead of ignoring certain files?

My programs generally generate huge output files (~1 GB) which I do not want to be backing up to the git repository. So instead of being able to do git add . I have to do something like git add *.c *.cc *.f *.F *.C *.h *.cu which is a little bit cumbersome... I feel fairly confident I could write a quicky perl script ls the direc...

How can I show the git branch of a rails app within that app?

I've got a couple of different branches of a rails app running in a development environment on the same server (on separate databases, obv), and I'd like to make it very clear what branch is being shown when I hit the app through the web. Any ideas, short of running git-branch or git-symbolic-ref HEAD in backticks and parsing the output...

Another use-case of splitting a git project into several subprojects.

I have split my project into several subprojects But all have a common part (directory with cmake scripts). Moreover some subproject need to include other subprojects (libraries). I would prefer to use git submodules but as far as I know they have a limitation that a submodule needs to be in a separate directory in the repo (does it?) w...

switch git branch without files checkout

Is it possible in git to switch to another branch without checking out all files? After switching branch I need to delete all files, regenerate them, commit and switch back. So checking out files is just a waste of times (and there are about 14000 files - it is a long operation). To make everything clear: I need all this to upload docu...

git without .git folder -- a remote git-dir

This question is asked out of curiosity more than for anything practical, but can I effectively have my $GIT_DIR be git://example.com/repo.git/ ? So there would be no .git folder -- every single commit, etc would go through the network overhead. edit: One potential use case might be for trying to do a simple "export" like svn, but it tu...

TortioiseGit - Trouble creating a local repository

Hey guys, I'm trying to get a local git repository running on my machine using tortoisegit, but I've been unable to do so. I've installed the latest version of msysgit (fullinstall 1.6.4), and the latest version of tortoisegit 0.9.1.0-32bit. I also running a relatively fresh install of winXp, so I doubt it's some sort of conflict. I...

git find fat commit

Is it possible to get info about how much space is wasted by changes in every commit — so I can find commits which added big files or a lot of files. This is all to try to reduce git repo size (rebasing and maybe filtering commits) ...

Git .Net files to ignore

What are your best pratcies for Git with .net. What files do you ignore and do not add to your project type? ...

Multiple git repo in one project

I'm using github as a repo for a little project, but I'd also like to use some code written by another github user. Is it possible to setup a /library/libraryname folder inside my project which maintains it's links back to the other users repo as well as being part of my projects commits? For example: If the other user updates their co...

How can I display my current git branch name in my PowerShell prompt?

Basically I'm after this but for PowerShell instead of bash. I use git on windows through PowerShell. If possible, I'd like my current branch name to displayed as part of the command prompt. ...

Capistrano: Unable to chdir or not a git archive

It is the first time that I try to deploy a Rails app with Capistrano. Here what happens when I call deploy:migrations: $ cap deploy:migrations * executing `deploy:migrations' * executing `deploy:update_code' updating the cached checkout on all servers executing locally: "git ls-remote [email protected]:/home/colli...

Unable to chdir or not a Git archive

I have created a remote bare repository: cd ~ mkdir -p git/foto-fiori.git cd git/foto-fiori.git git init --bare Then I added it: git remote add origin [email protected]:/home/collimarco/git/foto-fiori.git I get: $ git push fatal: '/home/collimarco/git/foto-fiori.git': unable to chdir or not a git archive fatal: The remote e...

git: how do I merge between branches while keeping some changesets exclusive to one branch?

There's a special place in hell for people who hardcode absolute paths and database credentials into multiple random places in web applications. Sadly, before they go to hell they're wreaking havoc on Earth. And we have to deal with their code. I have to perform a few small changes to one of such web applications. I create a new branch...

Checking out an SVN repository using Git - Fatal: unable to run 'git-svn' error

Hey guys, I'm trying to check out a svn repository using git. I'm using the following command: git.exe svn clone "https://svn.outserver.net:8443/svn/someProject" I accept the certificate, and the repository transfer starts. After a while, say 15min, I get a "fatal: unable to run "git-svn"". I have tried pulling down multiple times, ...