git - sasjakoning/blok-tech-2022 GitHub Wiki

To keep better track of my work and make backups, I'm using Git and Github.
With Git I can commit my changes and push them to Github using the command line.
:love_letter: Messages
When I commit my changes, I try to specify what I changed, added or removed.
- changed: message
- added: message
- removed: message
:deciduous_tree: Branches
Whenever I start working on a new part of my feature, for example, connecting the database, I create a new branch on Github.
When you work on a branch, all code you write stays in that branch. That way you can have a stable version of you code in "main" and experimental versions in separate branches.
Using Git, new branches are created like this:
git checkout -b "branchName"
In Github, you can then see and access these branches.

to switch to your new branch, you can use this command:
git checkout "branchName"
Branch naming
There are several ways to name your branches, I prefer to use the workflow below:

(image from: https://codingsight.com/git-branching-naming-convention-best-practices/)
All branches in which I create a new part of the app, are called "feature-branchname".