Some Useful Git commands for developers
echo "# git-commands" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/RohitK0608/git-commands.git
git push -u origin master
Open Terminal
Change the current working directory to the local repository where you want to configure the name that is associated with your Git commits.
$ git config --list
Open Terminal
$ git config --global user.name "myusername"
$ git config --global user.email "[email protected]"
Verify
$ git config --global user.name
$ git config --global user.email
Open Terminal
Change the current working directory to the local repository where you want to configure the name that is associated with your Git commits.
$ git config user.name "myusername"
$ git config user.email "[email protected]"
git checkout -b feature/feature-one
git clean -f -d
git fetch origin master
git reset --hard origin/master
Replace master with specific branch