git

Files in gitignore

I have a repository with a rails app in the production Server. In the repo there is the .gitignore file: ... config/database.yaml ... Every developing client have a cloned repo with different config/database.yaml. My problem is this: database.yaml is in .gitignore, then when I run git clone (on the server) the database.yaml wi...

How can I move a directory in a Git repo for all commits?

Let's say I have a repo that includes this directory structure: repo/ blog/ _posts/ some-post.html another-file.txt I want to move _posts to the top level of the repo, so the structure will look like this: repo/ _posts/ some-post.html another-file.txt This is simple enough with git mv, but I want to make the h...

Make git track data that is scattered across the disk

My project is set up so that I have source code and configuration files separate folders. For clarity, here is the basic folder structure: C:\SourceCode C:\ConfigFiles1 C:\ConfigFiles2 C:\ConfigFiles3 This causes a problem because I want to track all of these folders using Git. Git, on the other hand, seems to want every tracked fil...

Git push stuck at 99%

What do you do when you've added too many large binary files (PSDs) and tried to push, and git gets stuck at 99%? $ git push origin dev Counting objects: 4790, done. Delta compression using up to 4 threads. Compressing objects: 99% (4504/4512) git is currently using 2.7 gigs of memory and climbing. It was 2.0 when I started typing ...

How can I re-fetch the revisions of a newly specified branch with git-svn

I've fetched a whole repository from SVN up through revision 15000. I realized that I had an extra branch stashed away in a different location. Is there any way to update the .git/config file with the location of this new branch and re-fetch only the revisions pertaining to that branch? ...

What happens in Git to a tag when you amend the commit that was tagged ?

Hi. I have commited a few source files to my git repository and tagged it as a new version of my software. But I saw a mistake I had just made and used the "amend" feature to commit the corrected files. Now, I see that the tag was not transferred to the new commit (the one made with the "amend" feature). But I can also see that the tag...

Different between msysgit and cygwin + git ?

Hello What is the different between msysgit and cygwin + git? Now I'm use msysgit, but i don't like the Git Bash (you can't resize or copy/paste) and think about to change to cygwin, because then I could use mintty. ...

Git Extensions: No Windows Explorer shell on Windows 7 and all commands disabled in vs 2010 plugin?

Hi there, Just installed git extensions. All appeared to go well but if i right click in windows explorer there is no context sensitive menu for GIT as shown in the screenshots via the site. It seems to be missing. I have launched the Git Extensions applications and managed to clone a repository so i know its working but the integratio...

.gitignore question

I want to ignore everything except a couple files in the top-level directory and everything in a few directories with .gitignore My top level .gitignore is: * !/app/ !gbase.php !list-secret-prices.php The problem is that I have to put a .gitignore with one entry of: !* in each of the subdirectories that I want to include for it to w...

git: show all files changed between two commits

A riff on git: show all changed files between two commits: I want a listing of all files that have been changed between two commits, even if they are now the same (ie, changed and then changed back). ...

Using git below web root in production.

I'm an avid git user; I use git in development; in staging, but not in production. Are there any good reasons not to use git below the web root (/var/www/) in a production environment? I've been considering either using the master branch as the production branch, or creating a production branch. push production master sounds so nice....

"master" branch missing revisions after sequential "git svn fetch" calls

I initialized a Git repository with: git svn init https://path/to/proj Then I updated my .git/config file to specify the locations of the branches/tags: fetch = cascade/trunk:refs/remotes/trunk branches = cascade/branches/{feature-branch1,feature-branch2}:refs/remotes/* branches = cascade/branches/{6.x,5.x,4.x,3.x,archive}/*:refs/remot...

Git Extensions: Video Tutorial ?

Hi there, can anyone tell me if there is a video tutorial or similar for learning git extensions... I checked the manual but it really doesn't go into the "WHY" ... just what each menu does.. Coming from an svn background i am little confused with git extensions Any help really appreciated ...

Why does git pull --rebase fail when replaying existing commits?

I don't get this: when I 'git pull --rebase remote branch' it reverts my HEAD back to their shared root and then starts replaying all of the remote commits that have happened in the meantime. Why do these commits sometimes fail? They are clean commits on a clean workspace? Isn't that almost the point of rebasing? ...

What is my best option for submitting code to github from within an NTLM firewall?

Hi all, I'm thinking of using github to more nicely organise some of my code projects (i'm on a mission to implement all the major crypto algorithms in c, c#, js, golang, and ruby - but that's another story...). But i'm stuck behind an NTLM firewall. Any suggestions for how i'd check code in? Some kind of configuration of tortoisegit an...

How can I roll back 1 file change in my previous commit

Hi, I have made 2 commits (And I have not pushed) in git, where 'Commit 2' is the most recent one': git log -2 commit 791962d776f66253d656586b097b2677eaa983d1 Author: michael <michael@michael-laptop.(none)> Date: Tue Jun 29 23:20:58 2010 -0700 Commit 2 commit b743075e81f6fe25fe48ddbef2b5e7cc06623533 Author: michael <michael@mi...

How to prepend the past to a git repository?

I received some source code and decided to use git for it since my co-worker used the mkdir $VERSION etc. approach. While the past of the code currently seems unimportant, I'd still like to put it under git control as well to better understand the development process. So: What is a convenient way to put those past versions into my alrea...

Modify Git commands for Read-Only Filesystem??

Is it possible to create a Git repository that saves its objects into some database (SQLite, MongoDB, etc.) instead of on a filesystem? It looks like I could probably store a full repository in MongoDB using something like GridFS. Wondering if there is a way to make it so git push origin master reads from the database and acts just lik...

How to make a pre-commit hook that prevents non-UTF-8 file encodings

Is it possible to make a precommit hook for git or svn that can reject files not committed in a specific encoding? I have worked on several project where it seems to be a problem to stick to a certain file encoding (like UTF-8 for instance) ...

how can I customize git's merge commit message?

Every time I do a merge I need for a merge commit to be generated and I would like it to have more than just the summary of all the commits. My question is how can I format git-fmt-merge-msg or what determines this automated message (I can do this manually after a commit by amending it and using git-log --pretty=format:'...') For examp...