By George El. • February 2021 •
Reading time: 3 minutes
Amend your last commit git commit -m "first commit" git add my_file1 git commit --amend You end up with a single commit. You must not have pushed the brach somewhere
Discard changes in working directory The recommended command is “git restore”. The old command is “git checkout” Discard changes of a file in working directory
Difference Between Fast Forward and Recursive Merge
By George El. • February 2019 •
Reading time: 3 minutes
In this post I will clarify the difference between a fast-forward and a three-way or recursive merge and why you must use no fast-forward commmit in projects shared by many people.
As you can see in the following graph I have two branches: branch master has 3 commits which correspond to changes 1,2,3 and branch branch1 has 3 commits which correspond to changes 4,5,6
Ten Git Commands Every Developer Should Know
By George El. • February 2019 •
Reading time: 2 minutes
In this post I will explain 10 commands for your workflow as developer.
Inititalize the repo git init Add all files of your working directory in the staging area git add . Commit your changes with an informational message git commit -m "first commit" Upload your changes to github of course you need to have an account on github first, then you create a repo on github called myrepo