DEV Community

Cover image for The Newbie Dev: How to Use Github without the Command Lines
Isaac Melchizedek
Isaac Melchizedek

Posted on

The Newbie Dev: How to Use Github without the Command Lines

Nothing is What it Seems

Coding is hard. I know it’s an obvious truth, but oftentimes, those with years of programming experience forget this when dealing with mere mortals like us. I started learning front-end development barely four months ago, and on my first day in, I was already overwhelmed by the noise of various technologies - scarily echoed in group chats - SASS, LESS, Bootstrap, Vanilla JavaScript, React.js, Angular, Vue, and whatnot.

“What is going on here?” I seemed to be asking my creator.

Alt Text

I thought my job was to learn HTML, CSS, and JavaScript. I thought wrong. Besides these programming languages, preprocessors, and frameworks; something else was always mentioned when I started programming. The almighty Github. The most used version control system? What’s that?

The Bad Way to Introduce Git to a New Developer

Like I said earlier, it is quite difficult not to get unnecessarily overwhelmed by several tools and stuff one needs to master as a beginner. Having to worry about Git and Github was absolutely not something I was expecting until I did my first task in a Bootcamp and had to move everything to Git.

Apparently, to push codes on Git from your machine (yea, makes sense that my PC is what is called a machine) you need to run a series of codes from your machine’s terminal or get GitBash to run it for you.

Starting with:

git add .
git commit -m "<your message here>"
git push
Enter fullscreen mode Exit fullscreen mode

While I understand that it will help a fresh developer a lot to master git commands. I think it is ill-conceived and sometimes counterproductive to their learning goals. So, after using command line a couple of times I came across a very easy way to go about pushing my codes from my machine to Git.

Finding My Way Around Git Command Line

Alt Text

The easier alternative to using the Git command line is a very intuitive one that gets the job done without a single line of code. Of course, I am assuming that as a new developer, the only thing you do on Github is to push and fork new and existing projects.

To do this:

  1. Download and install GitHub Desktop
  2. Download a text editor, since we are all about intuitive and easy to use tools, I suggest VS Code. You can get it here.
  3. Create a folder where you will save all your code.
  4. Open your VS Code. Drag and drop the folder you opened inside the VS Code. Let’s name it codefolder. Create another folder, let’s call this one gitfolder. Abandon your gitfolder for now
  5. After you’ve saved all your files in your code folder. Go to github.com (not your github desktop). Create a new repository
  6. Make sure you didn’t add anything while creating your repository (leave the add README uncheck.
  7. On the next page, click on set up in desktop.
  8. That will take you to a dialogue box on your desktop. On the dialogue box, make sure you select URL at the top (Other options include “Github.com” and “Github Enterprise Server”) and your local path is gitfolder that we created earlier.
  9. Click clone.
  10. Now, copy and paste your codefolder or individual files inside it to your gitfolder.
  11. Go back to your Github Desktop and you will see that your codes have been added to it.
  12. At the summary side (left-bottom corner), type “initial commit” into the placeholder and click on commit to master.
  13. All you have to do now is to press the publish branch button.
  14. Congrats, your files are now on github. Go back to github.com to confirm it.

I know that this may seem like along method because of the number of lines I used in explaining it, but in reality, it takes less than a minute (and way less if you’re lazy like me) when practising it in real life.

As I’ve said earlier, this doesn’t mean you should not learn your git commands. Happy coding.

Top comments (0)