Showing posts with label git. Show all posts
Showing posts with label git. Show all posts

Friday, February 28, 2014

Removing deleted files from git

If you have accidentally added huge binary files in a repo and you want to remove them, use the following git command:
Thanks fly to Sam Watkins for sharing this.

Wednesday, January 15, 2014

Git rebase without commiting changes

If you are working on tons of changes (like switching from bootstrap v2 to v3), you might need to rebase often in order to keep up to date with your colleagues' changes. Working with visual studio helps keeping track of the added files, but if you need to, you can git add --all to add any new files. After that, create a temporary commit:

git commit -m 'tempCommit' // Create a temp commit 
git pull --rebase origin master // Rebase to the latest master 

Fix any conflicts if needed (and do "git rebase --continue" if conflicts occur) and then soft reset the head to discard the temp commit.

git reset HEAD~1

Wednesday, June 6, 2012

Compile git on iPad

Having gcc up and running on an iPad, you should make a symbolic link so that cc points to gcc in /usr/bin (ln /usr/bin/gcc /usr/bin/cc) .

Download and extract the latest source from gitHub

curl –O -k https://nodeload.github.com/git/git/tarball/master

tar xvf master

Build by issuing the following command in the extracted source dir (which I renamed to git):

make NO_PERL=1 NO_TCLTK=1 NO_GETTEXT=1

Sign the app:

ldid –S git

And you are ready to use git to clone the webinos repository Smile 

iPad:~/git root# ./git clone git://github.com/webinos/Webinos-Platform.git ../webinos
Cloning into '../webinos'...
warning: templates not found /var/root/share/git-core/templates
remote: Counting objects:
4297, done.
remote: Compressing objects:
100% (2384/2384), done.
remote: Total
4297 (delta 1827), reused 3944 (delta 1647)
Receiving objects:
100% (4297/4297), 46.08 MiB | 275 KiB/s, done.
Resolving deltas:
100% (1827/1827), done.
Checking out files:
100% (1682/1682), done.