Tags » Git

Adding an existing project to GitHub

Adding an existing project to GitHub using the command line
MAC WINDOWS LINUX
Putting your existing work on GitHub can let you share and collaborate in lots of great ways. 333 more words

GIT

How to remove local untracked files from the current Git branch

Well, the short answer as per the Git Documents is git clean

If you want to see which files will be deleted you can use the  87 more words

GIT

Git Cheat Sheet

How to merge two git barnches safely.

1. Create a branch and checkout to it

git checkout -b new-branch

This creates a new branch new-branch, based on master-branch. 163 more words

Git

How to merge a branch safely to master in git

1. Create a branch and checkout

Creates a new branch new-branch, based on master-branch.


git checkout -b new-branch

Creates a new branch new-branch, based on existing-branch. 65 more words

Git

Undo a commit

git reset HEAD~

This leaves your working tree (the state of your files on disk) unchanged but undoes the commit and leaves the changes you committed unstaged (so they’ll appear as “Changes not staged for commit” in  18 more words

Git

Stop git committing chmod changes

Pretty self explanatory. Just do this:

git config core.fileMode false

The documentation says this about it:

core.fileMode 
If false, the executable bit differences between the index and the 
working copy are ignored; useful on broken filesystems like FAT. 140 more words

git rebase

git pull --rebase origin master
First fetch the new master from the upstream repository, then rebase your work branch on that:


git fetch origin            # Updates origin/master
git rebase origin/master    # Rebases current branch onto origin/master
 
GIT