Git tutorial
Git tutorial
Git tutorial
Commands Required:
- git init
- git status
- git add -A
- git commit
- git remote add in link_of_the_empty_repository
- git checkout -b new_branch_name
- git push in new_branch_name
Some necessary git commands needed by the developer.
git init
This command initialises a empty git repository in the
current working directory.
git add -A
This command adds all the changed files in the staging
area.
git commit
This command used to save your changes to the local
repository.
git push -f
This command pushes your local changes to the repository
on the GitHub. To perform this action GitHub username
and token is required.
git clone
This command downloads the repository to your local
machine or pc.
git cherry-pick
This command helps to pick a specific feature from
different repository.
This command is powerful and it generates HEADS during
the execution of command. These HEADS need to be
resolved in order to cleanly pick a feature.
git rebase
This is the most powerful command in git. This command
has power to remove any unwanted commit and it also has
power to fix any mistake occurred in the previous commit.
This command can take an hour to understand. So, we will
discuss about this in any other session.