DEV Community

StuartCreed
StuartCreed

Posted on • Edited on

Using git and github together via Command Line

Github link: https://github.com/
Useful link to turn a local git into a global git on github: https://docs.github.com/en/github/importing-your-projects-to-github/adding-an-existing-project-to-github-using-the-command-line

Set up your computer so that it is allowed to access your Github account. To do this follow the steps in the following link:
https://help.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account

Or you can use Github Desktop, which avoids manually setting up the SSH. But the SSH method above is required for Unix command line environments where the Github Desktop GUI is not available.

"git clone" can be used to clone an online repository you have created on github. This can also be useful if you have just forked someone elses repository or you are using a different computer than normal. Link for more info: https://help.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository

Once cloned and you have made some changes to the directory:

Stage all commits:
git add -A

Commit the changes with a comment:
git commit -m "comment"

Push the committed files to the repository on Github:
git push

Now if you look at your Github repository online the changes will be visible.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more