create account

Git tutorial #7 - Test our project with Git by juanpchica

View this thread on: hive.blogpeakd.comecency.com
· @juanpchica ·
$0.99
Git tutorial #7 - Test our project with Git
<center>

Hello everybody!🤗 🤗 

In this post we will create a test project where we will run git, and we will have all our changes registered with this version control system.

![](https://steemitimages.com/DQmaycMA1njBce6uVyRvBVNsoAu5fpHFZkwdUY427xC3sSQ/image.png)

The first thing we will do is create a folder of our main project, in this case is `projectGit /` and in this folder we will run git, and we will have a control of the changes that we make in this folder, either change in code or add new files ...

Then we open SublimeText again, or the code editor of your preference and we will create a new file that will be called `index.html`, as we see below ....

![](https://steemitimages.com/DQmYqw1vjytBhJ3TfVb3Y5qNTMJN8bKJG3JpP5fhrKN4QSH/image.png)

Now that we create our first file in our project, we will start git in our folder.

The first thing we do is open our terminal, in my case I have a Mac, and I do it with the `cmd + space` keys and I type `Terminal`.

After having opened the terminal, we must locate in the folder of our project as we see in the following image ...

![](https://steemitimages.com/DQmSHGEWrgHAwNJmKHhCjXhpjvavCeRvoZdfU3QyaHkGsPg/image.png)

Now we first test that our project has not yet executed `git` and we do this with the `$ git status` command.

![](https://steemitimages.com/DQmPs6uvt8vFnR8fcwzYkRLfmmGPje2kuRcM7ih5ZfAxFPH/image.png)

If we receive the text of the previous image, it means that we have not yet executed git in our project, to initialize it we must write the following `$ git init`

![](https://steemitimages.com/DQmZFKJgXT7k1hrP6SXRCYpJLhf8DfSLc7Mn6ufmPooMgK1/image.png)

Well, now we have git, and if we run `$ git status` again we get a small state of our project, ie in which section of our git workflow we are and are our files.

![](https://steemitimages.com/DQmPEAAiXxq4zfuFDNk8q82rkvUMz1sMYuZqdqtw6xjSd9s/image.png)

As we see, at the moment we are in the working area, and if we want to generate a record that we have created a new file called `index.html` what we do first is to send it to the staging area, with this command` $ git add .`

![](https://steemitimages.com/DQma5J1Mg3BJDDC9S7Pac4jFQnv4zKPJjFBbC48x7Hsg7sb/image.png)

Now we have the file in the staging area, ready to publish it in our repository or area where we recorded the changes and for this we write the following command `git commit -m 'File index added" `

![](https://steemitimages.com/DQmXNd4tkDb6JtjNtsPf5wQz8217RmBkLz9w1mKXZSES7Yq/image.png)

In the previous image we see two things, first we have added our change to the repository and we have put a message that indicates the change or commit, then we visualize the project status again and nothing appears in the staging area or working area, and this is because there are no more changes in the project at the moment.

Well, that's all for this post, I hope you practice it and see that it is very simple to carry these simple steps with all the changes we make.

Regards! 👋 👋 


</center>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 311 others
properties (23)
authorjuanpchica
permlinkgit-tutorial-7-test-our-project-with-git
categorytutorials
json_metadata{"tags":["tutorials","dineroconopcion","programming","git","html"],"image":["https://steemitimages.com/DQmaycMA1njBce6uVyRvBVNsoAu5fpHFZkwdUY427xC3sSQ/image.png","https://steemitimages.com/DQmYqw1vjytBhJ3TfVb3Y5qNTMJN8bKJG3JpP5fhrKN4QSH/image.png","https://steemitimages.com/DQmSHGEWrgHAwNJmKHhCjXhpjvavCeRvoZdfU3QyaHkGsPg/image.png","https://steemitimages.com/DQmPs6uvt8vFnR8fcwzYkRLfmmGPje2kuRcM7ih5ZfAxFPH/image.png","https://steemitimages.com/DQmZFKJgXT7k1hrP6SXRCYpJLhf8DfSLc7Mn6ufmPooMgK1/image.png","https://steemitimages.com/DQmPEAAiXxq4zfuFDNk8q82rkvUMz1sMYuZqdqtw6xjSd9s/image.png","https://steemitimages.com/DQma5J1Mg3BJDDC9S7Pac4jFQnv4zKPJjFBbC48x7Hsg7sb/image.png","https://steemitimages.com/DQmXNd4tkDb6JtjNtsPf5wQz8217RmBkLz9w1mKXZSES7Yq/image.png"],"app":"steemit/0.1","format":"markdown"}
created2017-09-06 02:58:00
last_update2017-09-06 02:58:00
depth0
children3
last_payout2017-09-13 02:58:00
cashout_time1969-12-31 23:59:59
total_payout_value0.892 HBD
curator_payout_value0.095 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,997
author_reputation1,274,950,455,757
root_title"Git tutorial #7 - Test our project with Git"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id14,007,603
net_rshares295,161,797,252
author_curate_reward""
vote details (375)
@dineroconopcion ·
Este Post ha recibido un Upvote desde la cuenta del King: @dineroconopcion, El cual es un Grupo de Soporte mantenido por 5 personas mas que quieren ayudarte a llegar hacer un Top Autor En Steemit sin tener que invertir en Steem Power. Te Gustaria Ser Parte De Este Projecto?

This Post has been Upvote from the King's Account: @dineroconopcion, It's a Support Group by 5 other people that want to help you be a Top Steemit Author without having to invest into Steem Power. Would You Like To Be Part of this Project?
properties (22)
authordineroconopcion
permlinkre-juanpchica-git-tutorial-7-test-our-project-with-git-20170906t142518918z
categorytutorials
json_metadata{}
created2017-09-06 14:25:18
last_update2017-09-06 14:25:18
depth1
children0
last_payout2017-09-13 14:25:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length516
author_reputation23,995,833,646,806
root_title"Git tutorial #7 - Test our project with Git"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id14,054,887
net_rshares0
@drotto ·
<p>This post has received a 0.52 % upvote from @drotto thanks to: @banjo.</p>
properties (22)
authordrotto
permlinkre-juanpchica-git-tutorial-7-test-our-project-with-git-20170906t143038501z
categorytutorials
json_metadata{"tags":["tutorials"],"app":"drotto/0.0.1"}
created2017-09-06 14:30:45
last_update2017-09-06 14:30:45
depth1
children0
last_payout2017-09-13 14:30:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length78
author_reputation419,916,705,599
root_title"Git tutorial #7 - Test our project with Git"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id14,055,375
net_rshares0
@minnowsupport ·
<p>Congratulations!  This post has been upvoted from the communal account, @minnowsupport, by juanpchica 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 <a href="https://discord.gg/HYj4yvw">Peace, Abundance, and Liberty Network (PALnet) Discord Channel</a>.  It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.</p>
properties (22)
authorminnowsupport
permlinkre-juanpchica-git-tutorial-7-test-our-project-with-git-20170906t152916282z
categorytutorials
json_metadata{"tags":["tutorials"],"app":"cosgrove/0.0.1rc7"}
created2017-09-06 15:29:15
last_update2017-09-06 15:29:15
depth1
children0
last_payout2017-09-13 15:29:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length611
author_reputation148,902,805,319,183
root_title"Git tutorial #7 - Test our project with Git"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id14,060,645
net_rshares0