git

Send arguments from git push

Hi there, We're using a git post-receive hook to auto-minify our JS and sync our local and remote dev databases. This is generally desirable, but occasionally not. Is there anyway to pass an argument to the post-receive hook from git push so this can be disabled when required? Thanks! ...

Retaining file permissions with Git

I want to version control my web server as described here, by creating a git repo out of my /var/www directory. My hope was that I would then be able to push web content from our dev server to github, pull it to our production server, and spend the rest of the day at the pool. Apparently a kink in my plan is that Git won't respect fi...

git and Amazon s3

Can I setup Git and Amazon S3? Any ideas on ways of doing it? ...

Use git-svn with an existing repo lacking .git/svn/

I've cloned a project's sources using Git, which is converted on the server from a SVN repo. The problem with this Git repository is that it lacks tags, branches, and some revisions are missing. The number of revisions is enormous (~20000) for me to use git-svn clone, and it'd be a waste of bandwidth and time as I already have most objec...

Mac source control option with both working and live repositories being remote?

I've been doing LAMP development for roughly ten years now. I've occasionally used CVS and SVN. I code mostly with BBEdit. I am trying to setup some sort of source control to manage LAMP web apps. I prefer not to have a local repository. I usually have a dev server and a live server. I am looking for a source control option that will wo...

Git diff between given two tags

Hi I want to do diff between two tags and committed changes between those two tags, Could you please tell me the command?. Thanks Dhandapani S ...

git-svn updates not visible

Hi, I created a mirror of an svn repository via git-svn. The first time I did fetch from svn, I got revisions 1-7001, which I pushed to the github. Now that there are 7007 revisions in svn, I did git-svn fetch, which appears to have downloaded the missing revisions, but: I can't see them in git log (last one is 7001) they don't get pu...

Is there a command to undo git init?

I just Git init'ed a repos as the wrong user, and want to undo it. Is there no command for this? Do I actually have to go in and edit the .git directory? ...

How do I Re-root a git repo to a parent folder while preserving history?

I have a git repo in /foo/bar with a large commit history and multiple branches. I now want /foo/baz to be in the same repo as /foo/bar, which (I think) means that I need to create a new repo in /foo. However, I want to preserve history of changes that I've made to /foo/bar. I first thought of git format-patch followed by apply, but c...

Git bridge to Mercurial

I work mostly with Git and have a lot of code on github. I would also like to have it on Bitbucket, for people using mercurial but more importantly as I want to also have the code on my domian, and BItbucket supports Cnames for hosted code. So is there a way for me to mostly work with Git, but also be able to push to HG. Github created...

Git: application configuration and different environments

We use git for most of the web applications we build in our shop, and though the applications themselves use a variety of technologies (PHP, Rails, etc), we generally have a staging and production server for each site. Typically, these servers have different sets of database credentials as well as different environment-based configurati...

simplest way to get the SHA of an arbitrary git object?

I want a git command that simply outputs the SHA of an arbitrary object (commit, tree, blob, whatever). Basically: $ git sha HEAD 7b78f727c91edc7726f3c31113bc7b1509fea163 $ git sha master^:CHANGELOG 0dcc5f003ed89c30a8d0376a29d546c20449fd90 ...and so forth. This should be the simplest thing in the world, but I can't figure out a good w...

git push .git/description file

Is it possible to push the changes in the .git directory to a remote repository? I wish to have a common project description and not have to re-enter it for all the clones of my repository. It's strange that the project description is something that is not common to each clone. ...

GIT adding comments to all files changed since a certain commit

I'm working on a code base that's not mine for a project. I created a new git repo when I first started editing the code and probably touched a dozen or so files with new code since, making many commits. What I would like to do is add a comment to the top of each change stating that I changed the code there, just for recording purposes....

Why to use SVN? Any hidden pros (over GIT/Mercurial/Bazaar) there?

Possible Duplicates: Why is git better than Subversion? I've already read a lot (not enough to get the perfect picture though) about versioning systems, and the obvious conclusion is that GIT is simply the best. Or Bazaar maybe. Or Mercurial. But if so it was, then nobody would be using SVN, but they still do. Why? I myself ha...

git: update a local branch without checking it out?

I work on a project that has 2 branches, A and B. I typically work on branch A, and merge stuff from branch B. For the merging, I would typically do: git merge origin/branchB However, I would also like to keep a local copy of branch B, as I may occasionally check out the branch without first merging with my branch A. For this, I would...

Git mysteriously deleting all files upon commit

I'm pretty new to Git (and version control in general) and am ashamed to say that this problem has been going on for a while now. Occasionally, after adding changes, git will delete everything from my repository upon the following commit. Afterward I add and commit again, and it creates everything it just deleted. It hasn't caused an...

Smallest, toy, Distributed version control system to study

I am interested in writing a toy DVCS. What is the smallest DVCS around to study ? (I don't need ssl, ssh, svn compatibility etc... it should just be able to do local repositories) ...

heroku-like git setup?

I'm a noob when it comes to git. How would I get it so I can do something like git push production master and have the remote repository mirror my own? Currently, whenever I run git push production master I get: error: By default, updating the current branch in a non-bare repository ... ! [remote rejected] master -> maste...

How can I restore the commit init from git?

I have a folder, which I use "git init", then, I use "git add ." to add all the files in to git. After that, I use a "git commit -m "initial setup" ". Now, I doing something, that I did wrong, I want to back to the status to "git commit -m "initial setup", what can I do? thank you. I may explain it in this way.... My Files: ABC ---> gi...