Posts

Showing posts from February, 2021

Important GIT COMMANDS

Image
  1) Create a new repository git init Git command to init or create new repository  Executing this command creates a local repository with a default  main (or  master ) branch. To connect this local repository to Github, we need to create a remote repository on Github. And connect the remote repository’s origin with the local repository. git remote add origin https://github.com/ YOUR-USERNAME/YOUR-REPOSITORY Git command to add remote origin to the local repository  Finally, push the main branch on Github. git push -u REMOTE-NAME BRANCH-NAME Git command to push the local main branch  Note:   Execute all Git commands via terminal(Linux) or Git Bash(Windows) in the project working directory. 2) Make a new branch The gold standard for implementing a new feature is to create a new branch and put all the code in it. This keeps the existing code safe from bad implementation. git checkout -b NEW-BRANCH-NAME Git command to create a new branch  The checkout...