Working away with GIT can be tedious especially for a newbie. Following GIT commands will help you accomplish many things with GIT. I took the commands from the GIT website. But sometimes it may not be quite straightforward to find these combinations of commands.
Creating a new repository on the command line locally and pushing the changes to it and the remote repository.
echo "# Echo-Oracle" >> README.md git init git add README.md git commit -m "first commit" git remote add origin https://github.com/adilraja/Echo-Oracle.git git push -u origin master
Pushing an existing local repository to a remote repository from the command line.
git remote add origin https://github.com/adilraja/Echo-Oracle.git git push -u origin master
Import code from another repository
Undoing changes on the remote repository
If by chance you have made unintended changes to your remote repository, by adding a new commit to it, you can undo the changes using the following commands.
git reset 7f6d03 --hard
git push origin -f
Replace the number above in your reset command with the SHA of the commit that you want to revert to on the remote repository.
I found the following commands on GitLab. You might find these useful too.
Command line instructions
Here is a great tutorial on git.
If you found an error, highlight it and press Shift + Enter or click here to inform us.
Discover more from Psyops Prime
Subscribe to get the latest posts sent to your email.
Working Around With GIT by Psyops Prime is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
