Git¶
Configuration¶
Before you run any command you hate to configure git once on your machine
Basic¶
Start a new project
Clone a remote project (here an example with Win11Debloat)
ACP cycle¶
ACP: Add, Commit, Push
To see what is modified, staged and your branch
Add¶
Commit¶
Push¶
Will push the local main branch over the remote main branch.
-u option allow saving the link between remote branch main and the local branch main. Thus, you will be able to only write git push.
Branch¶
To see both remote and local branch
To see link between local and remote branch
Switch¶
To switch branch to dev
Tags¶
While branch are an active line of development, tag are static pointer to a specific moment in your repo history.
Tags are immutable while branch are mutable.
When you are satisfied of your app, and you went to set a version run:
Then you have to push the tag.
Good tags workflow example¶
This last command will push branch and tags.
Rebase¶
Rebasing allow you to reorganized pasted commits.
Good rebase workflow example¶
Go to main
Get last commit of main
Create a new branch for your feature
Code your feature and make several commits
When you finish, get lasts commit of main that were created during development of your feature
Apply your branch over the last commit of main, conflict may happend here
Resolve conflicts if any then
Clean your commits
Push the branch