commit 4c37585565d414757bd7192b0e05a5ca4973fd6c Author: Robin Hübner Date: Fri Aug 4 00:43:50 2017 +0200 initial commit. diff --git a/README.md b/README.md new file mode 100644 index 0000000..c3a0cfd --- /dev/null +++ b/README.md @@ -0,0 +1,38 @@ +General Usage +--------------- + + # check status, see files changed etc + git status + + # add a file to next commit + git add + + # commit with given message + git commit -m 'tweaked turn velocity for green grunts' + + # push your stuff + git push + + # undo all local changes in your working directory (reset state to last commit basically) + git reset --hard HEAD + + # reset to last commit (only git wise, changed files will remain changed and will be reflected with git status/git diff) + git reset --soft HEAD^ + + # safe revert, if you want to undo your last made commit, this will produce a new commit for this exact thing + git undo HEAD + + # show changes since last commit + git diff HEAD + +Branching +----------- + + # create a new branch and switch to it + git checkout -b your-branch-name + + # merge changes from another branch into your current branch + git merge other-branch-name + + # push your current branch to "your-branch-name" on remote + git push -u origin your-branch-name