Topic #1 Git Basics
This is the first topic of the development crash course. I will try to keep every topic short but detailed in the sense that many times people will assume a lot of of the steps in the process. I remember when someone told me: Clone the git repo and it took me almost 2 hours to get everything ready and I did not fully understand what was going on specially from someone who came from Subversion (which is another control version system).
Topics
N | Topic |
---|---|
1 | Getting git basics, create repository, configure globals, get basic git knowledge in the most common commands. |
- | Learn BDD development using Cucumber. |
- | Run tests and verify results |
- | Setting up NPM for NodeJS dependencies. |
- | Setting up Sublime text editor with certain plugins and configuration to suit your programming language needs. |
- | Start an Express application for web usage. |
- | Save data in MongoDB |
- | Get some MongoDB basic usage and queries. |
- | Apply styles to the web application. |
- | Deploy application in Heroku. |
- | Run tests and verify results |
Today's lesson will start with #git
For this crash course we will be using a linux mint install. I usually tweak a little every Linux for my conveniences, I’ll have a section below that just explains a little bit about what tweaks I’ve done for Linux.
This is the starting screen from Linux Mint Sylvia
What is git?
In my own words, It is a version control system that allows multiple developers to work on the same project locally and then upload changes to a central repository where conflicts can be fixed.
How to install it?
Open a terminal and type:
sudo apt-get install git
You will see which packages will be installed and just type ‘Y’ to proceed.
After couple seconds you should see that the process finish correctly.
Type ‘git’ in the terminal to see some useful information. I’m aware that there are IDE’s and Tools for doing this in GUI but for educational purposes let’s keep this plain and simple. Every IDE, Tool or App will in the end run the commands in background mode, so you better understand what’s going on.
We just have git installed and that’s it, no repository yet. To create a repository we will either start it by creating it locally and then upload it to a service like Github or Gitlab to mention some. Or we can create the repository in the services and then clone them to our environment.
Locally created repo
Cloned repository
Git configuration
When you first attempt to commit something git will ask you what is your username and email. This is very important because that is how your commits will be 'signed' as author. It happened to me once that I worked on the same project with 2 different computers which appeared as different git users just because I configured the username different, so be careful.
Once you managed to set that up you will be able to successfully commit. But that's it you just added a change locally not in your repository.
You need to set up the remote or origin repository URL to start pushing your local changes to that repository and have it safely stored in their service / cloud.
If everything worked correctly you have just uploaded your first change or commit from your local repository to the remote or origin repository. There are many jokes about git push like the fire meme. The truth is that you can solve the problem in your local environment but you have done nothing until you push it. I will keep this topic short. There are other related things we will be working in the next topics that are related to git and development over all.
If you have questions or need help please let me know. The idea is that at the end of this crash course we will be having something developed to share :)
Nice. Git is probably the first thing an aspiring developer should learn because it allows her to make changes and mistakes and then roll them back to a working version.
So I have to install and run a new operating system on my machine? I currently run Win 10, do I need to re-partition my hard drive to allow for the installation of Linux? Will any Linux version suffice- like Unbuntu?
God, 1st class and already behind the 8-ball- the story of my life....
Well, becoming a developer is like jumping into a rabbit hole. One solved problem leads to another unsolved problem.
You can use something like Docker to run various operating systems on your machine. Well, another rabbit hole.
You can do a virtual machine. I believe I already posted a video let me look at it.
https://steemit.com/utopian-io/@raserrano/creating-a-virtualmachine-with-xubuntu-for-development
Thank you! I have a question on downloading Oracle's Virtual box. Email may be better- I'm [email protected]
You just planted 0.57 tree(s)!
Thanks to @raserrano
We have planted already 3827.33 trees
out of 1,000,000
Let's save and restore Abongphen Highland Forest
in Cameroonian village Kedjom-Keku!
Plant trees with @treeplanter and get paid for it!
My Steem Power = 20726.57
Thanks a lot!
@martin.mikes coordinator of @kedjom-keku
This post has received a 8.62% upvote from @lovejuice thanks to @raserrano. They love you, so does Aggroed. Please be sure to vote for Witnesses at https://steemit.com/~witnesses.
This post has received a 14.29% upvote from @msp-bidbot thanks to: @raserrano. Delegate SP to this public bot and get paid daily: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP Don't delegate so much that you have less than 50SP left on your account.