git

Can i know the revision number of a commit?

I can see revision number in svn by commands like svn info, but in git i can only see sha object names, is there any way to know how many revisions have been commited? ...

Git undo last commit

I accidentally added the wrong directory containing my files instead of adding a .java file. I added the directory containing the .class file. How can I undo this action? ...

Is it worth going to Git from SVN for a single developer?

Is it worth going to GIT from SVN when the repositories are mainly accessed by a single developer? I have several machines that I use for development and not mainly develop in C#. But I have a mix of VB, VB.Net, PHP, C#, C++, HTML, Batch, BASH and many more in my repositories. What, if anything, will I gain by migrating to GIT from SV...

How do I tell git to always select my local version for conflicted merges on a specific file?

Say I'm collaborating with someone via a git repository, and there is a particular file that I never want to accept any external changes to. Is there any way for me to set up my local repo to not complain about a conflicted merge every time I git pull? I'd like to always select my local version when merging this file. ...

Using git with emacs

I am trying to configure git.el. When i do git-status i can see the status buffer with changed i can also add files using 'a' but when i try to commit a file using c writing the commit log and finishing it with C-c C-c gives me env: git: No such file or directory error and file is not committed. I am using emacs 23 on OS X. The only ...

git remove oldest revisions of a file

I have a 33 MB large file where I want to permanently delete the oldest revisions of that file, so I only the latest X revisions are kept around. How to do it? My bare repository has grow huge because of it. I have tried the following.. but it removes the file entirely git filter-branch --index-filter 'git rm --cached --ignore-unmatc...

Does there exist a "wiki" for editing doxygen comments?

I'm working on a fairly big open source RTS game engine (Spring). I recently added a bunch of new C++ functions callable by Lua, and am wondering how to best document them, and at the same time also stimulate people to write/update documentation for a lot of existing Lua call-outs. So I figured it may be nice if I could write the docume...

Manage home directory across multiple machines with some differences?

So I've got a pretty customized setup of dotfiles at this point, and I've been looking for a solution to keep things synchronized from machine to machine. I like the idea of having a ~/dotfiles dir (or similar) that contains a makefile that handles creation of symlinks. Move the dotfiles dir from machine to machine via rsync/unison/dvc...

Tracking other peoples projects with git.

Assuming that project A is using git as its SCM. I clone their repo make changes suiting my needs, after that can i still pull updates from their repo and keep my changes? ...

How to apply a git patch from one repository to another?

I have two repositories, one is the main repo for a library, and the other is a project using that library. If I make a fix to the in the subservient project, I'd like an easy way to apply that patch back upstream. The file's location is different in each repository. Main repo: www.playdar.org/static/playdar.js Project: playlick.com/...

Middle-ground between submodules and branches?

I just got around creating topic branches for my project's unfinished features, managed by Git. They are all very self-contained in such a way, that one topic branch doesn't directly relate to another topic branch. All branches, however, have some common ground, the master branch, which is the core of the system, the topic branches just ...

git undo changes in some files.

While coding i add print stataments in to files to keep track of what is going on. When i am done is it possible to revert changes in some files but commit the file i actually worked on? Say i added prints in File A but i modified File B. B is what i want to commit and A i want to go back to its old state ? ...

How to custmoize git.el's diff face in Emacs?

My Emacs is set to display text as black background on green text. The problem is when i do a diff using git.el the part at the top of the buffer showing changes starting with --- or +++ is showed using greenish color on green so i can't read i check git.el but can not seem to figure out which face is used to control this ? ...

Maintaining unrelated directories in one git repository

I'd like to combine two or more directories in one git repository. These repositories are logically linked but belong to different filesystem paths, e.g. /etc/httpd and /var/named/chroot/var/named both contain virtual host data which I'd like to manage as a whole, but I can't link them. I've asked the git mailing list but had no luck. ...

How do I prevent autotools from re-generating configure script automatically?

Sometimes due to the SCM not strictly remembering the timestamp of files the generated Makefile will think that it needs to re-run "autoreconf -i" or equivalent to re-generate Makefile.in from Makefile.am, configure from configure.ac, etc.. How do I prevent this? I want to prevent it because it causes these problems: when creating a ...

Multi-stage deployment advice?

What are some best practices and general theory of multi-stage deployment for web apps? I'm particularly interested in deploying Rails apps using Git, Capistrano, and Passenger, and I've found posts that discuss the nuts and bolts of the process: Capistrano: Multistage Introducing AutoTagger What considerations should I take with re...

Continuous Integration Advice?

I'm working on setting up a Continuous Integration server (using Integrity) for my Rails app, and I'd like advice: Do most folks set up CI to build and test their app on every push to their central SCM repository, or only when pushing to their staging branch? I'll use the CI server to automatically run flay, flog, reek, and rcov -- are...

git - removing a file from source control (but not from the source)

Here is a simple question. I have cloned a project that includes some .csproj files. I don't need/like my local csproj files being tracked by git (or being brought up when creating a patch), but clearly they are needed in the project. I have added *.csproj to my LOCAL .gitignore, but the files are already in the repo. When I type git...

what are the pros & cons of Git and Hg Version Control System?

I am now in a condition to choose which Version Control System, so I would like to get some comment from experience developers who have used these. Which one i should use and in what condition? ...

How to fool git-svn to recognize merges made with svn?

We have an SVN setup with stable trunk and unstable development branch. Dev work is (mostly) done on the branch and then merged to trunk before deployment. I use git-svn as my SVN client. My merge process from unstable to trunk is as follows: git svn fetch git co -b trunk svn/trunk git merge --no-ff svn/unstable git svn dcommit svn...