Learning LINUX Without Installing Linux Series SixsteemCreated with Sketch.

in #steem7 years ago

gitone.JPG

What is the use of GIT anyways? I hate the sound of it. That is what most people say when it comes to GIT. So can somebody come out in the open and tell me what it means. Or, what is it? What is the use of knowing anything about it. Should I care who created GIT? Why are nerds and geeks talk so much about it? Why can't I (Some Microsoft Windows User) know about it? How come these group of people don't know anything about it.

Let us simplify the answer. Let us make it so peculiar. If you don't know anything about GIT. This is what you will be carrying all the time. Without GIT this is what you GET. Tons of these.

gittwo.JPG

Professional programmers are using GIT and Cloud Repositories for all their working needs. They don't carry USB around and brag about nothing. All coding is being pushed and pulled in and out of the Cloud. Github, Bitbucket and Gitlab etc. always come to mind.

gitthree.JPG

So enough of the talk and let's get our hands dirty. It is time to use our favorite Linux hangout. And our favorite Linux playground. JSLINUX. Point your browsers again to the following:

https://bellard.org/jslinux/vm.html?url=https://bellard.org/jslinux/buildroot-x86-xwin.cfg&graphic=1

This X11 Windowing system will emerge. And this is different from what we have experienced before.

gitfour.JPG

Just RIGHT CLICK using your mouse on the gray area of the screen and then expect a window like this to come out.

gitfive.JPG

Just LEFT CLICK using your mouse on the area which says "Terminal" Expect thisto pop out suddenly.

gitsix.JPG

Now it is the usual turn of events. Just type the commands and learn as much as you can. In the terminal prompt. Just type the following. And don't forget to press the ENTER key. Only letter F is capitalized.

~ # ls -alFt

Which will result to list these. It is showing us the file structure in the ROOT directory.

gitseven.JPG

Not let us go to the main directory. We do this by typing these. And pressing ENTER key afterwards.

~ # cd /

giteight.JPG

At the prompt you will notice the changes. The forward slash will be present.Which indicates that we are in the main directory.

Now let us check using the command that we have learned previously. Use the pwd command. Press the ENTER key.

/ # pwd

gitnine.JPG

Just as we expected we really are in the main directory. Now check and list the file and directory structure. Using the command. Or using the UP arrow key.

/ # ls -alFt

gitten.JPG

Next, let us make a directory file by issuing this new command. Adding it to our plethora of commands. Don't forget the ENTER key.

/  # mkdir steemit

giteleven.JPG

Let us check what happened. By issuing the ls command. Again

/ # ls -alFt

gittwelve.JPG

You will notice the existence of "steemit" directory and this where we will start our journey with GIT. Now let us change our directory from main to the "steemit" directory that we just created. By the typing the following command. You can also use the UP and DOWN arrow keys.

/ # cd steemit/

gitthirteen.JPG

We are now inside the the steemit directory. Now let us check the and list the content of the directory. We us ls again to get the job done.

/steemit # ls -alFt

gitfourteen.JPG

This essentially is listing nothing. It contains nothing. Virtually nothing. Now for the first time let us use the GIT.

/steemit # git --version

gitfifteen.JPG

It says the version is 2.8.3 we wont concern ourselves with this for now. It is just that GIT was created by the Founder of Linux and The Father of Linux himself Linus Torvalds. That is why it is so important.

Let us proceed to using and issuing the following command. To get it rolling.

/steemit # git status

gitsixteen.JPG

It is saying that the directory that we are in. Is not a git repository. So how do turn it into a git repository. Let us issue then the following command.

/steemit # git init

git17.JPG

Let us see what happened. So it turned the directory into a repository. And it says that it created the .git/ directory.
So this is the proof. We just use the ls command. Or the UP and DOWN arrow keys.

/steemit # ls -alFt

git18.JPG

It really created a git directory in the steemit directory. Now let us use the vi and what we did with vi the last time around.

/steemit # vi app.js

git19.JPG

If you did the last edition of the series. We created a simple node.js code. To simulate the things that programmers do in the real world minus the heavy workload. We press 'i' to insert. We press 'Esc' key to transition. We press ':' to other important commands in the vi editor like saving the file. So for now press 'i' to start inserting your code. And then type the following

console.log('Welcome To Steemit');

git20.JPG

Now press the 'ESC' key. And then do the following. Press the colon key and 'w' 'q' . Which means write and quit.

:wq

git21.JPG

git22.JPG

We just saved the file app.js, so now we check if the git can sense what happened. By typing and issuing this command.

/steemit # git status

git23.JPG

GIT was really great at sensing changes to the repository. Now it wants us to use git add to track the file.

/steemit # git add .

git24.JPG

Now let us see what happened to our recently issued command by issuing another. Let us use git status to see what is happening to our repository.

/steemit # git status

git24.jpg

It turned green meaning it is now in the staging directory. Some commands were also given to remove it from the staging directory. By the command itself. Now let us commit. Make our first commit. To the repository. Issue the following command:

/steemit # git commit -m "first commit"

git25.jpg

We just placed app.js in the repository. But we need to change the configuration. For author identification.

git config --global --edit

git26.jpg

Just edit the details. I will be doing the same.

git27.jpg

git28.jpg

I removed the hashtags. I edited the as per user details. And saved it. Just like what we learned when using VIM or VI. Now let us check if the changes has been made. By issuing the following.

/steemit # git config -l

git29.jpg

Now let us see our author details.

/steemit # git log

git30.jpg

This is were we introduce the so-called path of blame. In the professional coding circle this is the place where we look for when looking for someone to blame when the build fails to compile. The authorship is really important in the software circle and this is the area where GIT is known for. If you break it. Fix it.

Again we are here to learn. GIT as a version control system is crucial in the software development life cycle. We are done for now so take care and see you soon

Sort:  

Thanks to provide Great New and Useful Information

You're welcome. @jerry huge let's see what this @cleverbot says

Congratulations! This post has been upvoted from the communal account, @minnowsupport, by mdominicorobin from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, someguy123, neoxian, followbtcnews/crimsonclad, and netuoso. The goal is to help Steemit grow by supporting Minnows and creating a social network. Please find us in the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.

Thanks a lot guys. Zzzzzzzzzz

This post has been ranked within the top 50 most undervalued posts in the first half of Sep 25. We estimate that this post is undervalued by $16.39 as compared to a scenario in which every voter had an equal say.

See the full rankings and details in The Daily Tribune: Sep 25 - Part I. You can also read about some of our methodology, data analysis and technical details in our initial post.

If you are the author and would prefer not to receive these comments, simply reply "Stop" to this comment.

I never thought of it that way.

Coin Marketplace

STEEM 0.18
TRX 0.13
JST 0.029
BTC 58269.58
ETH 3138.31
USDT 1.00
SBD 2.43