This command is used to see whether git is locally installed in your computer or not
This command is used to initialize a git repository locally on your computer.
This command is used to see latest changes in the code you have made after the last commit.
This command is used to add index.html file into staging area before commiting.
This command is used to add all edited files into staging area before commiting.
This command is used to commit your latest or recent changes and saves your work with a commit ID and a message.
This command is used to see history of all your commits.
This command is used to see latest changes you have made in a file after the last commit.
This command is used to undo the latest changes you have made in a file after the last commit.
This command is used to revert to the old commit and also places the HEAD of git to that commit.
This command is used to place the head to the last commit in current running branch but the changes in the code are those where we reverted.
This command is just used to show that we have reverted to old commit.
This command is used to create a branch named as branchName.
This command is used to see all the branches and also tells us which branch is currently running.
This command is used to switch branch from one to another.
This command is used to merge branch named as branchName with the one you are currently working on.
This command is used to permanently delete a branch named as branchName.
This command is used to permanently delete a branch named as branchName.
Go to github.com and click on new repository, Give a name to it and click create repository to create a freshy.
1) git remote add origin https://github.com/Raza023/GitAndGithubIntro.git
2) git branch -M main
3) git push -u origin main
Use these above commands to push local repository to remote.
1) git remote add origin https://github.com/Raza023/GitAndGithubIntro.git
2) git branch -M main
3) git push -u origin main
Use these above commands to push local repository to remote.
If you change code on github and commit it right there on github. It will be only there on github but is not mapped on local repository. To reflect those changes in local repository as well you have to run this command.
Fork someone's github repository in your github account.
1) git clone https://github.com/Raza023/testing.git clonedrepo
2) git remote add origin_clone https://github.com/Raza023/testing.git
3) git push -u origin_clone master
Use first command from above commands to clone repository into your local directory. And after you are done making changes into code, Use other two commands to push those changes into your forked diectory. And then send a pull request to user whom you forked that repository from. He will test your code and will merge it into his own code, if he wants.