Notes about Git version control system taken from online tutorials such as:
Git = distributed version control system
Working directly on GitHub website:
- Commits tab on github will store all the version of the code (the files).
- OBS: Each commit has an unique identifier (hash)
- For merging two branches:
- Press button Compare and pull request -> Create Pull Request -> Solve conflicts (if they appear) -> Commit Merge -> Confirm Merge
- Fork: copy someone’s repo (with an exact replica and all previous commits)
- Insights tab => visualize tree branches (network)
- Github clone => clone is different than fork/pull: it means copying/downloading a repository to your local PC, from which you can commit and push later to the github remote/server.
GitHub issues
Issues are usually used for comments: todos, bugs, feature requests, etc.
- An issue could be open/closed
- An issue is opened until it’s solved (If it’s resolved, it will be closed)
- All issue have an Id number (#10) that you can also add in the commit comment/message (eg. write “Solve authentication bug that fixes #10”)
- You can use keywords for issues in commit messages (eg: “fixes #10” will automatically close the issue #10)
- You can also put the entire hash code into an issue to refer to that exact commit (especially useful for different branches) and it will be automatically converted to a link to that commit.