GIT

git vs svn

git svn
push commit
master trunk
pull update

Git command line

  1. The common Git guides are:

| guide | description | |————|——————————| | attributes | Defining attributes per path | | everyday | Everyday Git With 20 Commands Or So| | glossary | A Git glossary| | ignore | Specifies intentionally untracked files to ignore| | modules | Defining submodule properties| | revisions | Specifying revisions and ranges for Git| | tutorial | A tutorial introduction to Git (for version 1.5.1 or newer)| | workflows | An overview of recommended workflows with Git| Run like git help <guide_name>.

  1. Git Bash
git log -10
git diff HEAD
git add tools/git.md
git status
# commit everything with message and author overridden
git commit -a -m 'modified git.md' --author illegitimis
git help push
git push
git push origin
git reset HEAD^
git revert <commit>
# list local and remote branches verbose
git branch --list -a -vv
  1. update fork. If using SourceTree one can pull from remote origin, selecting the dev branch to pull.
cd <dir_where_i_cloned_my_fork_of_a_repo>
git remote add bradyholt-cron-expression-descriptor-master https://github.com/bradyholt/cron-expression-descriptor
git pull bradyholt-cron-expression-descriptor-master master
# unstage_conflicts
  1. git push SSL_ERROR_SYSCALL
git config http.postBuffer 524288000
  1. file history
    • GitLens extension
    • file commit history with patches and beyond renames
  rem path to file is relative to root
  rem differentiates revisions from files
  $ git log --follow -p -- ./src/Proj/Validation/OrderRequestDtoValidator.cs
  1. stashes
git stash list
git stash show stash@{0}
  1. github update fork from master
git remote -v
git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git
git remote -v
git fetch upstream
git checkout master
git merge upstream/master
git push -v --tags origin master:master