Thursday, September 1, 2022

git command

 Git Commands

git reset --hard  ==> To remove all the modified files from stage

Create a local branch and commit to it

git checkout -b your-branch-name

git add .

git commit -m "Your Message"

Push your branch to your remote (server)

git push -u origin your-branch-name

$ git push

fatal: The current branch your-branch-name has no upstream branch.

To push the current branch and set the remote as upstream, use


git push --set-upstream origin your-branch-name


**You need to map your branch with the upstream

git push --set-upstream origin your-branch-name

No comments:

Post a Comment

Ruby Basics

Basics of Ruby   Start Ruby interpret On terminal just type rib ruby_docs $ irb 3 . 0 . 0 : 001 > name = "This is the first ...