git

how to (unobtrusively) specify commit messages in your editor/ide

Background: the current text editor i am using does not have built-in support for git. Nevertheless, it has support for user-created addons, so I made one for auto-commiting to the repository each time I save a file. Although auto-saving to the repository is straightforward, the commit messages currently are not very useful, they just s...

how to keep in Sync with GIT repo on Mac OSX computer

Hi, I have a git server setup on an online VPS and I develop from my Mac Snow Leopard desktop. The VPS might go away at any point (and I don't feel like paying monthly subscription for private git repo) so I want to make sure that my repo in Sync at all times with the server. What is the best way to do so? Do you recommend having some ...

How to remove a file from a git commit to push to svn

I replaced a folder and all its contents with a symlink. That is removed the folder and added a symlink, in a single git commit. Git commit happened normally. However when I try to push to the upstream svn, it complains that the file exists. Now, how do I amend my commit to not contain the git add of the new symlink and make it a new c...

Synchronizing Git and Svn

I have a SVN repository and I used: git svn clone <svn url> I have also created a repository on github. So every time I push the changes to github I would also commit the changes back to SVN. git svn dcommit Everything worked fine until my harddisk crashed. Now I need to restore a working copy of my source code. I can think of two...

Unable to remove a .svn folder from the svn repository

I checked out a git clone of the svn repo. Some how, git checked in the .svn files into the repo. I was only working on the git locally; so no problem. But I cant update any other svn repo anymore. Even when I git svn clone the entire folder, I don't get the .svn folders. So, how do I delete them? ...

Deploy to a machine in the network using git.

I am developing an app and version-control it using git at github. Now there is another machine for testing purposes without access to the internet, so I cannot pull the changes from github. I am able to connect to the test server through the network. My question is: is it possible to push changes from the development repository to the ...

Is there a git uncheckout?

With git clone there is the option -n wich prevents a checkout of HEAD after the repository is cloned. Is there a possibility to do this manually? Edit I think the option -n reads better in the manual than it actually is: After cloning with -n all my tools show that I still reside on the master branch; the only difference being that all...

Git: is there a quicker way to merge from one branch to multiple branches than doing each one serially?

Hello, My situation: I've recently joined on the front-end side of an established project that involves a growing number of instances of a rails app, each of which which differ in some aspects (views, styling, settings etc) but which all share the majority of their back end code. Our Git repo has a number of branches looks something l...

SVN update and commit problem used with git-svn

I can't svn up or commit. :( There is a svn centrally and I use git locally using git-svn. Basically, somehow, I added a folder that had .svn folders into the git and committed it to svn. Both git and central svn happily committed the .svn as the content folder, without complaining. Now, I can't svn up to the existing folder as, once ...

Resolve "CONFLICT (delete/modify)" in git

In one branch in one branch A a file is changed and the change commited. Now in another branch B the very same file is edited and renamed. When merging B into A git recognises the conflict properly (CONFLICT (delete/modify)) and both files are in the working directory. If I know want to have both changes in one file, how do I do this b...

Creating a branch containing changes between two codebases?

I made an open source release based on a codebase which contained unfinished refactoring and other misc changes. Unfortunately it turned out to take a lot more work than expected and so now I am considering re-releasing the last stable codebase, and make a new branch that would contain any changes I did since. How would you go about tha...

Git post-receive hook not working

We're using git with a central repo (using Gitosis). I've created a post-receive hook to generate an email to the dev mailing list whenever changes are pushed to the central repo, and to generate documentation from the documentation folder in the git repo. Therefore, in ~git/ I've got a directory, we'll call it 'a' that contains a clone...

Is it possible to move/rename files in git and maintain their history?

I would like to rename/move a project subtree in git moving it from '/project/xyz' to '/components/xyz' If I use a plain 'git mv project components' then all the file history for the xyz project gets lost. Is there a way to move this such that the history is maintained? ...

Entire file conflicting in git after first two lines

Between myself and another programmer who are working on the same project we consistently have a problem with git where we will commit a few changes to a specific file, push the changes up, and when the other pulls down the entire file is conflicted. It only happens with one file in our repository. Also we noticed in github when you vie...

Writing a git hook to automatically modify code during local commits

I'd like to write a git hook that automatically does some code cleaning, such as removing trailing whitespace. It's easy to write a script to reject certain commits, but I'd rather just fix the problems transparently when possible. While I realize git has some built-in support for stuff like this (automatically converting newlines, etc.)...

Can I delete a dangling branch in my Git history if the merge is empty?

I am new to Git and have the newb following dilemma. I moved my old svn repo to github initially by just initializing a repository full of the files from my svn repository (minus the .svn stuff). Then, later I read that I could import my svn history, maintaining the history. So I deleted all contents of my master branch on github and ...

new computer, git pull origin is asking for a password

on my new computer, I setup git and my putty.exe and ssh key etc. just fine. So I do a: git pull origin and then at the command prompt, I am asking for a password. I have no idea what password it wants, and then it also asks for my server's password after a few failed attempts at the first password. it asks for: blahblah@serveradm...

Can git automatically switch between spaces and tabs?

I use tabs for indentation in my python programs, but I would like to collaborate (using git) with people who use spaces instead. Is there a way for git to automatically convert between spaces and tabs (say, 4 spaces = 1 tab) on pushing/fetching? (similar to the CR/LF conversion) ...

SVN not an option on my linux box - alternative VCS for lone developer?

Hi, annoyingly I've just given up on setting up Subversion on my Centos web server, mainly due to the fact that the server has cPanel, which uses EasyApache, which in turn doesn't support DAV and makes it awkward to install and configure manually. So, I'm now looking at alternatives - Git seems to be the VCS of the moment, but I'm only a...

Nested git repositories without submodules?

It seems a git repo inside a parent repo isn't included in a commit on the parent unless it's setup as a submodule. Is it possible to override this behaviour and treat the nested git repo as any other directory? I don't want to rely on external dependencies through submodules but want to use git to manage these dependencies within the pr...