How to commit changes to GitHub repository using vs code?

Tariq Abdullah
1 Min Read

In this article, we are providing a few commands that are used to commit changes to GitHub repositories using VS code terminal.

Committing changes for the first time

For committing changes for the first time, follow these steps:

  • Open VS code –> go to Terminal.
  • Clone your GitHub repository.
    Go to your desired directory where you want to clone the repository and paste the following command:
    $ git clone <url-to-repository>
  • Now make all the changes you want.
  • After that, run the following command:
    $ git add .
    Here, the dot (.) refers to all folders.
  • Now, commit changes with a message:
    $ git commit -m "write something here"
  • Push all changes to the repository.
    $ git push
  • Now, refresh your GitHub repository, you will be able to see all changes there.

Committing further changes

If you have already committed any changes before, then you don’t need to clone your repository again. Make changes and then commit and push as shown above.


 

Share This Article
Tariq is founder of Bioinformatics Review and Lead Developer at IQL Technologies. His areas of expertise include algorithm design, phylogenetics, MicroArray, Plant Systematics, and genome data analysis. If you have questions, reach out to him via his homepage.
Leave a Comment

Leave a Reply