Tag: git

CVS or SVN or GIT?

Possible Duplicate: Revision Control System Recommendations I’m in the middle of developing a web app. Which version control system (CVS/SVN/GIT) is recommended for managing a web app (it’s environment is PHP/MySQL, Apache 2, Ubuntu 10.10 64-bit server)? The web app is being developed on a dev/sandbox server for now, but will eventually be hosted on […]

Shell script helper for git commits

I’m trying to write a simple shell script that simplifies the git commit process. Instead of git add . -A git commit -m “message” git push I want to do commit.sh “my commit message” Here’s what I have: #!/bin/bash commit_message=”$1″ git add . -A git commit -m $commit_message git push There’s two problems with this: […]

Similar trick to git bisect WITHIN a commit

With git bisect we can zoom in on when a problem might have been introduced between commits. I was wondering if there is also a way to have git go through (combinations) of files within a single commit, so you can figure out which file / part is causing the trouble?

How to remove generated files in Git repo?

I created a git repo and worked a bit on my android projekt, but now I recognize that I added files into the repo which will change each time because they are generated. How can I remove them and be sure that wont be added again. I have already added them to the .gitignore which […]

Force git to manual merge even in “obvious” situations

There are a couple answers on how to do it (this and that) suggesting to use a custom driver, which seem quite fine. However, there is that particular situation when a given file isn’t changed in the merged branch so git won’t even call the merge driver, but simply overwrite the file. Is there a […]

Can't add a file separated with space to git

I have been writing a script to add untracked files using git add . The loop I use in my script is for FILE in $(git ls-files -o –exclude-standard); do git add $FILE git commit -m “Added $FILE” git push origin master done The script runs fine till it faces a filename which has space […]

How to clean all commits from remote github repo

I had by mistake pushed hundreds of commits from my local repo to a newly created github repo. How can I clean/remove all these commits on the remote repo so that github repo is clean as it was in the start? I would like also to lose history on those actions. I would like to […]

Macosx git autocomplete shows deleted branches

I think this may be a duplicate, but I can’t find a straight answer to my current problem. I’m trying to get my macosx git autocomplete to work similar to the git autocomplete I have on my linux box at work. I found some instructions that led me to install https://github.com/git/git/tree/master/contrib/completion (i’m using the .bash […]

How can I get the equivalent of .hgignore's regular expressions ^var/(?!\log|.dummy) and ^var/log/(?!\.dummy) in .gitignore?

I am converting my Mercurial repository to Git. Part of the file system looks like this: |– .gitignore |– .hgignore `– var |– .dummy |– asdf `– log |– .dummy `– asdf My .hgignore file uses regular expressions. Part of my .hgignore file is as follows: ^var/(?!\log|.dummy) ^var/log/(?!\.dummy) I want to track the .dummy files […]

Git sparse-checkout on a remote with a post-receive script

I’m trying to figure out how to do the following (and figure out if it’s even possible). I have a local git repo with a number of folders for various things, but I want to be able to deploy my website with git to my development server and really only the contents of one folder […]

Git Baby is a git and github fan, let's start git clone.