37 examples for git
# Setup git global configuration git config --global user.name "John Doe" git config --global user.email johndoe@example.com git config --global core.editor vim
# allows you to commit your changes with a message detailing what you have changed git commit -m "Fixed unit test"
# Checkout Subversion repository in standard layout (branches, tags, trunk) using Git git svn clone svn://example.org/path/to/repo targetdir -s --prefix=origin/ [--no-minimize-url] [--authors-file=/path/to/authors.txt]
# a better alternative to git pull, won't commit merge conflicts !git remote update -p; git merge --ff-only @{u}
# create a git alias, now git ci "message" is a command git config --global alias.ci 'commit -m'
# Shows the URL of the github project (run this command inside the project directory) git remote get-url origin
# When the "assume unchanged" bit is on, Git stops checking the working tree files for possible modifications, undo with --no-assume-unchanged git update-index --assume-unchanged
# Delete (one of the) last commit(s) without shooting yourself in the foot # In the editor that opens, remove the line of any commit you want to discard. # Only shows commits not pushed to upstream, thus avoids trouble later on. git rebase -i
# add remote https git remote add origin https://server/user/repo.git # add remote ssh git remote add origin git@server:user/repo.git
# Push new local branch named newbranch to remote repository named origin git push -u origin newbranch
# allows you to save changes, and will first show changes which are to be made, and will prompt you to write a description of the changes. git commit
# stages files in current dir and sub-directories (unless they are excluded in the .gitignore). git add *