Skip to content

Latest commit

 

History

History
41 lines (40 loc) · 1.18 KB

Git-commands-guide.md

File metadata and controls

41 lines (40 loc) · 1.18 KB

Git commands

If your new to project then clone it.(One time)

$ git clone https://github.com/naaniz/Restaurant-Bot-Automation.git

For regular usage

To make some changes and push to git remote repo.

To create a new branch from another branch.

  • Switch to specific branch. (check your current branch on vscode editor)
$ git checkout <branch_name>   
  • Now create a branch from this current branch as root.
$ git checkout -b your_patch <branch_name>
  • First stage your changes by this command
$ git add . <to stage all files> or git add filename (to stage required file only)
  • After staging you need to commit the changes once after commit can't undo changes.
$ git commit -m "feature name u have added"
  • Now its time to push to the remote repo.
$ git push
  • Thats it now your code has been pushed to remote repo.

But it always won't be smooth as above.

  • some times you need to pull before push
$ git pull

Delete Previous local branch

$ git branch -d branch_name

Warning

Always check for the current branch your working is right or not on vscode editor and also Never merge pull requests on your own.