Date: 11/04/2017
Accepted
We use git and GitHub in different ways, it’s emergency to teach team members with the git basics and style guide we will use.
- setup ssh keys (https://github.com/settings/keys) or GUI;
- clone repo into local system:
git clone git@github.com:huifenqi/django-project-skeleton.git; - files store in three stages:
Working Directory: holds the actual files;Index: staging area which store your changed files;HEAD: points to the last commit you've made.
Working Directory->Index:git add <filename>orgit add *;Index->HEAD:git commit -m "Commit message";- push updates to Github:
git push origin master; - create branch:
git checkout -b feature/x
- push branch to Github and others can see:
git push origin <branch_name>; - sync local with Github:
git pull; - make a new tag:
git tag <tag_name>; - show history:
git log; - show changes:
git diff <previous_commit_hash>; - others:
git status,git branch,git tag, etc.
- Choose short and descriptive names: https://github.com/agis-/git-style-guide#branches;
- Use dashes to separate words.
- Each commit should be a single logical change. Don't make several logical changes in one commit;
- when writing a commit message, think about what you would need to know if you run across the commit in a year from now.
- http://rogerdudler.github.io/git-guide/index.html
- https://confluence.atlassian.com/bitbucketserver/basic-git-commands-776639767.html
- https://github.com/agis-/git-style-guide
Make sure everyone follow the guide, check the Github feeds often.