git

Can't find git-svn on Mac OS X Leopard after installing via MacPorts

Okay people, I'm sure someone has had this issue and can help me out. I'm trying to get git-svn working on OSX Leopard (10.5.6). Using MacPorts I've run the install thus : sudo port install git-core +svn However, git-svn has not been installed and is not available. No errors came up during the lengthy dependency installation and so I'm...

git: How do you stash an untracked file?

I have changes to a file, plus a new file, and would like to use git stash to put them away while I switch to another task. But git stash by itself stashes only the changes to the existing file; the new file remains in my working tree, cluttering up my future work. How do I stash this untracked file? ...

Unable to combine Version2 to Version1 in Git

I have two files which are called version1 version2 Version1 has my own changes, while version2 is based on version1 but it has other people's changes too. I run the following command at my Git folder where Version1 is git add version2 I now have two separate files in Git. I would like combine them now. Which command should I ru...

How to migrate from a complicated subversion repository to a distributed version control system?

Let's suppose we have a subversion repository which looks like /original/0.1 /original/0.2 /variantA/trunk /variantA/branches/who/branch_for_xxx /variantA/branches/she/branch_for_yyy /variantB/trunk /variantB/branches/who/branch_for_zzz (... 30 or 40 alike) where variantA and variantB are forks of the original software. I am looking ...

Is Git only for source control?

Is it insane to integrate Git into the project that has nothing to do with source control. I am thinking about data collector that regularly runs several commands on the client side and commit the output into the local git repository. If remote server is available it pushes the data in origin for further processing on the server side. ...

Best way to integrate Git with Ant?

I am looking for the best way to integrate Git with Ant. Is there a widely used Ant task for Git? Does anyone have any experience using Git through Ant (e.g. dedicated task, exec call, etc)? ...

Unable to Git Pull to update my Git local repo

I removed a file in my local Git repo. I want the file back by updating my Git repo. I run the following unsuccessfully git pull It says upToDate, but I did not get the newest file. The public repo at github does not use SVN, so the problem cannot be SVN. How can you update your local Git repo, such that you get your removed File ba...

git newbie error - how to recover

Possibly related to http://stackoverflow.com/questions/286988/git-pulling-changes-from-clone-back-onto-the-master I was working on an ASP.NET project when I discovered I needed to make an "experimental" set of changes which may or may not have been required in the production version. The obvious thing to do was to create a branch. How...

Is it possible to do a git-rebase after doing a git-commit

I started to rewrite some of the Perl programs from the NASM source files. I have already done a few commits to my own working copy, and I was wondering if I should have instead of doing git pull, if I should have been doing git rebase. I have pretty much decided that I should have been doing a git rebase, but I don't know how to rework...

Git ignore file for C projects

I've just started to learn C (using Thinking In C) and I'm wondering about what files I should be ignoring in a C project's git repository. No suggestion can be too obvious -- I'm a total noob. Thanks! ...

How can I put a database under git (version control)?

I'm doing a web app, and I need to make a branch for some major changes, the thing is, these changes require changes to the database schema, so I'd like to put the entire database under git as well. How do I do that? is there a specific folder that I can keep under a git repository? How do I know which one? How can I be sure that I'm pu...

How to perform something akin to svn tagging in Git ?

My application needs to conform to a new specification. So I want to tag a version of my app as it stands. I want to be able to check out this version in the future. I committed all my latest changes. And I do: git tag -a stable-pre-new-spec When I execute: git show stable-pre-new-spec it displays the diffs from my last commit ?...

create a git symbolic ref in remote repository

In my remote bare repository the HEAD is pointing to "refs/heads/master" and I want it to point to "refs/heads/other". I am not able to go to remote repository directory and run git symbolic-ref. Is there any git command to achieve it? Or any other way? If there is no way, does Github allow to change the HEAD? Thanks in advance. ...

Merging only modified files using Git

I have a repository which contains Content & Source files. Developers should work only on source files. To save space, developers should not clone the content files (which are in GB) to their local repo. Source files are not present in the project as sub-modules rather they are in the same location where the contents are. My approach i...

Do you need to create a branch to check out a specific git revision?

A common thing I'd like to do is revert my working copy to a particular revision, do some testing, and then bring it back to the head of my current master. In the past I have naively done a "git checkout hash" only to lose my head. I've since learned I can create a branch and check that out, switch back and delete the branch, but it fe...

pull/push from multiple remote locations

Short: is there a way to have a git repo push to and pull from a list of remote repos (rather than a single "origin")? The long: I often have a situation when I'm developing an app in multiple computers, with different connectivity -- say a laptop while on transit, a computer "A" while I'm in a certain location, and another computer "B"...

Git: how is a branch I'm not committing to ahead of origin/master

Hi all, I work 100% with a branch that I made off of the master branch. Now that a colleague has pushed back to origin/master, I tried to push those changes into my personal branch. When I do a 'git checkout master' followed by a 'git status' I get the following: # Your branch is ahead of 'origin/master' by 2 commits. How is a branch...

Difference in 'git log origin/master' vs 'git log origin/master..'

Can anyone explain what the exact difference is with the above? I'm trying to understand what exactly the '..' notation does. I thought it was a range, but in this case it does something different: git log origin/master git log origin/master.. ...

Deploy from Git using Capistrano without a hard reset?

I've an issue at the moment where we are running a CMS within a site (browsercms) that lets the user upload files. However, every time I do a deploy Capistrano runs a hard reset thus nuking any uploaded files. Does anyone have any suggestions as to how to prevent the hard reset, and just do a pull, or a way of moving the uploaded files...

Is it safe to use a copied git repo?

If I make a copy of a tracked folder using rsync -a or cp -R, can I then use the copy as if it were a git clone, or will that cause all sorts of weird problems? This is all running on my computer, so no one else is accessing the repository. Obviously, the git-cloned dir know where it was copied from, so I can do git pull without specify...