Results: 102
git init
Creates an empty git repository to the current folder
git init
Creates a directory
mygit
inside the current folder and an empty git repository into the newly created folder
git init mygit
Modify files
->
Move to staging area
->
Commit
Remote Repository
Local Repository
Repository
Working directory
Staging
Commit
Message
To see what changes each feature takes separately
Not to commit feature changes on the main branch until it's finished
Not to Interfere while other developer is trying to fix an issue on main branch
If I work on two features at the same time, I should be able to commit the finished feature changes immediately
Multiple developers can work together on the same project
No need to wait for someone else to make their changes
Git can merge everyone's changes together
Everyone can have the most updated copy of the project's files
Reasons to love Git
History
Collaboration
Feature branches
Starts the process
git bisect start
We can add part of changes (from the same file) to the staging area and not to add the rest of the changes
git add -p
It will ask us interactively whether we want to add each individual changes to the staging area or not
y
means yes,
n
means no
git log --graph
Draw a text-based graphical representation of the commit history on the left hand side of the output. This may cause extra lines to be printed in between commits, in order for the graph history to be drawn properly
git log --oneline --all --graph
When --graph is not used, all history branches are flattened which can make it hard to see that the two consecutive commits do not belong to a linear branch
Results: 102