So I came across this problem on Dropbox, but I am sure people will experience it elsewhere.
While working with a developer in India, I turned a dropbox folder into a github repo (by running git init) so I could easily diff changes done overnight. I did experience one problem though that came up randomly. One day I woke up to a bunch of modified files that apparently had no differences. When I diffed one, I got the following:
diff --git a/assets/js/jquery-ui-1.8.11.custom/development-bundle/themes/base/jq
old mode 100644
new mode 100755
If you already pushed a commit to github and want to roll it back:
For the last commit:
git rebase -i HEAD~2
Delete the line of the commit you want to remove (If you are in VIM, 'dd' then ':wq')
git push origin +master
This should also do it in 1 command (have not tried it):
git push -f origin HEAD^:master
http://stackoverflow.com/questions/448919/how-can-i-remove-a-commit-on-g...
If you want to delete a tag on github:
git push origin :TAGNAME
e.g.
git push origin :1.0M1
To git@github.com:mystuff/myproject.git
- [deleted] 1.0M1
1. Download Git from the OSX link:
http://git-scm.com/download
That will take you to this Google Code project:
http://code.google.com/p/git-osx-installer/downloads/list?can=3
2. Run the Installer.
3. In order to allow someone to clone your repository, you need to make sure that git is part of the system PATH.
Create or Edit a file called ~/.bashrc
Add the following:
export PATH=$PATH:/usr/local/git/bin
Now verify that the path is accessable to a no-login shell:
ssh localhost echo \$PATH
You should see something like this (Just make sure /usr/local/git/bin is in it)
I have a Windows 7 desktop and a MacBook Air. I prefer working in OSX, but my Windows 7 Core i7 processor w/ 6 GB of Memory / Intel solid state hard drive runs circles around my MacBook Air w/ Core2 Duo Processor and only 2 GB of ram.
Considering I like to work when I am on the road (carpool), I need an easy way to share files between my Windows Desktop and my MacBook Air laptop. Since I love Git, I will describe a simple way to do this.
1. Set up SSH Server on Windows 7
http://www.scottmurphy.info/open-ssh-server-sshd-cygwin-windows
2. Set up Git
Git comes with a pretty nice repository browser that is pretty easy to setup.
You can see an example here:
http://git.kernel.org/
Building git automatically creates everything you need.
Detailed installation instructions are in the INSTALL document of this folder, but a simple install can be done as follows:
Let's assume you want to create a virtual host named git.yourdomain.com (for your site, replace all git.yourdomain.com below with your site name).
Prerequisites:
packages gcc, zlib-devl, and perl-ExtUtils-MakeMaker, and python-devel must be installed.
yum install gcc
yum install zlib-devel
yum install perl-ExtUtils-MakeMaker
yum install python-devel
First, let's build git. I am assuming you want it installed for all users so let's switch to root and build it:
su -
cd /usr/local/src
wget http://kernel.org/pub/software/scm/git/git-1.7.1.tar.gz
tar xvfh git-1.7.1.tar.gz
cd git-1.7.1
./configure
make
make install
Now, verify the install:
git --version
You should see:
git version 1.7.1