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.

Heroku

Deploy with ease. Manage efficiently. Scale faster.

Leave the infrastructure headaches to us, while you focus on pushing boundaries, realizing your vision, and making a lasting impression on your users.

Get Started

Top comments (0)

Image of Datadog

Get the real story behind DevSecOps

Explore data from thousands of apps to uncover how container image size, deployment frequency, and runtime context affect real-world security. Discover seven key insights that can help you build and ship more secure software.

Read the Report