Mastering Git
Here is I'm going to give you the best practice of using Git effectively and efficiently. I assumed that you already know about Git and have at least a little experience with it.
- Create a repository for every project you got. By your account, team, or group.
- Fork a repository. Keep it up to date.
- Create a branch for every feature.
- Create a pull request if you have completed the feature.
- Discuss with your tech lead if you get merge conflicts.
The master branch is the production. Don't push any changes directly to the master. Create the feature branches with the "feature/" prefix. You also could make other branches with other prefixes, such as "fix/" for fixing bugs as an example. You could return to the branch if there is a new bug or related improvements. Here are my other tips:
- Give meaningful message for every commit you make.
- Get used to Git CLI (Command-line Interface) commands. Here are the cheat sheets that may help.
- Ignore some files. Such as configuration, temporary files, etc. I suggest you create the .gitignore file in the first commit, maybe with README and LICENSE files. Here are the documentation and generator that could help.
Related Articles
- PageSpeed
- What is CMS?
- What is eCommerce Website?
- What is Professional Website?
- How Important Website and Social Media for Companies?