Push code to GitHub without using the command line, in just 2 steps!!?

Push code to GitHub without using the command line, in just 2 steps!!?

how to add your code to GitHub without writing a single command?

·

3 min read

Hello, everyone Nomadev here, back with another blog on tech. As a developer, you have used version control, Undoubtably every successful software project requires a version control system to facilitate the operation of various modules and versions by other teams. While thinking about version control the first thing that pops in my mind is the command-line interface, where we have access to source control features powered by git and GitHub.

Surely it is a good practice to use the command line, but sometimes it's not that handy to rewrite the same lines if you are having multiple minor changes in quick succession.

In this blog, you will learn how to push the code from Visual Studio Code to Github. Before we get started, let us have a brief about Git & Github

Git - In simple words, Git is software for tracking changes in any set of files, usually used for coordinating work among programmers collaboratively developing source code during software development. Git is a distributed version control system, which means that the entire codebase and history is available on every developer’s computer, which allows for easy branching and merging.

GitHub - It is a web-based version-control and collaboration platform for software developers. GitHub facilitates social coding by providing a web interface to the Git code repository and management tools for collaboration.

I think that was enough description of Git and Github, so without wasting much time, we will proceed to our 2 easy steps.

start.gif

0. Prerequisites

You must have Git, VSCode installed in your system & must have a GitHub account au. Open your project's folder into VS Code and authenticate VS Code to use GitHub.

Ctrl + K + O

1. Publish to Github

Publishing code to GitHub means creating a repository there, with the desired name and visibility type. Click the Source Control icon on the left (Ctrl + Shift + G) and press Publish to Github.

publish.PNG

2. Select Repository's Name and Visibility

After you click Publish to GitHub, you will see the option on VS Code to Name the repo and to select its visibility.

select name and visib.PNG

After that, you will find an option to select the files you would like to push, select them and press ok.

Tada, This was it, wasn't it so simple?? You have pushed your code to GitHub, within 2 easy steps.

fc.PNG

successfull.png

After you have published your repository to GitHub, you can do whatever you can do with the CLI (i.e commit, push, pull, etc) from the Source Control Section (Ctrl + Shift + G), by just having single clicks instead of writing long commands.

git.png

So this was it, If you liked this blog make sure to follow me on Twitter where I post daily threads on Programming, Open Source, and on Getting better remote job opportunities.

twitter.gif

Here are a few

Make sure to like, comment, and follow so that you don't miss the amazing content. And let me know int the comments what you like, doing it with CLI or this one. Happy coding!

follow.gif