Version Control
Git and GitHub
Week 1
Day 2
Segment 1
Centralised and Distributed VCSs
- With the intent that there is One True Source
- All developers work (checkout) from that source, and then add (commit) their changes
-
Systems are designed with the intent that one repository is as good as any other, and that
merges from one repository to another are just another form of communication.
- Any semantic value as to which repository should be trusted is imposed from the outside by process, not by the software itself.
- init
- add
- commit
- remote
- pull
- push
- merge
- branch
- checkout
- status
- diff
- log
- rebase
Git commands ( with common flags )
- Forking and cloning and the difference between them.
- How to create repositories.
- What are README files?
- How to read other people's repositories.
Repositories
Commit
- Why commit often and in a logically coherent units
- Difference between staging area, index area, and, working directory commit
- Conventions to follow during a commit
- Searching through a commit
- git log --author="Arfat Salman"
- git log --grep="db"
- What is an issue?
- Atomic PRs
- How to create an issue
- How to assign it to a member?
- How to create a Pull Request referencing that issue
- How to review a PR
Issues and Pull requests(Github)
Branch Naming Conventions
Different companies follow different conventions to name branch
1. <username>/feature/feature-name
2. Use specific terms:
- Feature: feature/feature-name
- Bugfix: bugfix/bugfix-name
- Hotfix: hotfix/hotfix-name etc.
3. [Feature]: feature-name
Workflow
Git + GitHub (Week 1, Day 2, Segment 1)
By Amal Augustine
Git + GitHub (Week 1, Day 2, Segment 1)
- 185