Join us

13 Git Commands to Master Version Control

This brief reading is going to enable you with the basic yet versatile commands and concepts that’ll allow you to practice version control liked a skilled coder.

Git, or the ‘Global Information Tracker’, is a powerful tool for realizing cooperation and coordination over the internet. Software development, webpage design or even for regular document control, Git is an essential skill that you can’t miss out on.

There are a number of web-based applications for Git, two of the most widely used are (you have probably heard) GitHub and GitLab.

(Images from Google.com)

(Images from Google.com)

Anyhow, the core of Git remains the same for any operation environment. This brief reading is going to enable you with the basic yet versatile commands and concepts that’ll allow you to practice version control liked a skilled coder.

Workflow: Working Directory, Staging Area & Repository

Working Directory: current state of files and folders inside your file system.

Staging Area: a temporal location for your files before you commit them.

Repository: the location created by Git that holds the committed files, you can see it as a folder.

(Images from livecodestream.dev)

The general workflow for Git is actually quite simple:

Download/Pull from server→Edit on your working directory→Add to staging area→Commit to your repository →Merge to the master branch→Upload/Push to the server→Approved/Rejected.

(Images from livecodestream.dev)

Branches

Branches, as its self-explanatory name, is a tree-like structure for making alterations or testing on different versions to prevent messy interference. The default main branch is called the master branch.

Each team member can derive a branch for his/her work at any stage, finish their work, then commit to the master branch.

(Images from livecodestream.dev)

Finally, if the administrators agree with the changes made, they will merge the branch back to the master branch.

(Images from livecodestream.dev)

Commands

Here I present 15 essential commands and their purposes that will satisfy a regular workflow, which helps understand how and when to use them. For specific syntax, please refer to: https://git-scm.com/docs

(Original Images)

For More

There you go! Now you understand how Git and version control works and are equipped with the ability to deploy them. There will be a hands-on demonstration of Git application along with a top-to-bottom machine learning project from data collection to model deployment In the near future. So, stay tuned~

Please clap for the article if you like it or leave a comment if you have any suggestions. :)

Additional Reference: https://livecodestream.dev/post/git-concepts-and-workflow-for-beginners/


Only registered users can post comments. Please, login or signup.

Start blogging about your favorite technologies, reach more readers and earn rewards!

Join other developers and claim your FAUN account now!

Avatar

Che Ting Meng

@psydak-meng
Computational Science and Engineering Masters Student @ Georgia Tech
User Popularity
19

Influence

2k

Total Hits

1

Posts