


Summary: Everybody forks the repo (as a clone ‘ upstream‘), then modify master branch and push to ‘upstream’. Popular: Medium or big size teams, Open Source projects, Online/cloud hosting projects.Īlso known as: GitHub-flow, Fork-and-Pull, Upstream-repo
#Assembla git clone branch update#
Git commit # push to remote repo 'origin', branch 'ducquoc-br' git push -u origin ducquoc-br # update some more and push git push # pull a branch with rebase option to fetch without merge git pull -rebase origin ducquoc-br # reset local master branch to be latest as origin git checkout origin/master git branch -D master git branch master git checkout master # reset local master branch - using reset hard git update-ref refs/heads/master origin/master git reset -hard master # delete a local branch 'ducquoc-br' git branch -D ducquoc-br # delete remote branch 'ducquoc-br' on 'origin' (and strip some un-merged commits) git branch -rd origin/ducquoc-br git push origin :ducquoc-br # If you don't use the colon ':', use -delete option instead Git checkout -b ducquoc-br master # modify and add some file git status Later branch will be pushed to remote ‘origin’, then merged (after pull-request).Ĭommon operations: # switch to new branch 'ducquoc-br' based on master Summary: Everybody create their own branch (for some feature/issue), then commits to it. Popular: Small & Medium team (5-40 developers), private/prorietary repo.Īlso known as: Feature-branch, Checkout-rebase Git add LocalFile.txt # Stage a file 'LocalFile.txt' Git clone status # View the state of the repo Ĭommon operations: git init -bare /path/to/repo.git Summary: Everybody pull and push changes to One centralized (blessed/shared) repository – “origin”, One branch “master” (exactly the same way with SVN – trunk & HEAD). Īlso known as: Blessed-center, Free-for-all, Shared-repo. Popular: single-man project, small team (< 6 developers) with high trust, SVN evangelists. (Eclipse users nên dùng STS có cài sẵn plugin: ) (Lưu ý: cài trên Win nên chọn: checkout As Is & commit Unix-style git config - global core. Windows: TortoiseGit (nên cài Git for Windows/MsysGit trước): ( command is one of: clone, config, add, commit, push, log, fetch, pull, merge, rebase, checkout, branch, reset, status, blame, diff, apply, revert, update-ref, … ) View command help (options, parameters, … ) : git help command
#Assembla git clone branch download#
(Target audience: developers who knows SVN/CVS, so it skips some intro about Git) Download Command-line client
