From 4c37585565d414757bd7192b0e05a5ca4973fd6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20H=C3=BCbner?= Date: Fri, 4 Aug 2017 00:43:50 +0200 Subject: [PATCH] initial commit. --- README.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 README.md 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