git
😁I created this repository with the help of friends Aaron Watts and Shakti Sarkar.
We are all students of the Web Developers Bootcamp by Colt Steele on Udemy and members of their Facebook Group.
Using git
in your environment is crucial for a Web Developers workflow. It is even more important when working with others.
Throughout my time on the FB group, I realized that not many members were familiar with git
.
So, one day I created a poll and was thrilled at the outcome.
git
is a version control system.It tracks all changes made to files under its directory and allows developers to quickly revert back to any version of any file. Also makes project collaboration easier by multiple authors and makes it easy to merge all changes into one source.
Github is a cloud-hosted website for storing files under version control using
git
.It is used for code sharing, debugging, and collaboration. It is also a Social Networking site used by Developers and Programmers all around the world!
You should know that Github is not the only place where you can store your files. Other popular alternatives are Gitlab and Bitbucket.
However Github has proven to be the Industry Standard, is far larger than all the others, and has seamless integration with many online services.
git
, as I have only ever used it in my own personal projects.The purpose of this repository is for us/we/me/you to learn the basics of using git
, both for personal use as well as in a team environment.
This is my first ever collaborative repository working with others. So forgive me as I learn how to manage the collaborative tools that Github has to offer.
If you are an absolute beginner and know nothing about git
, then I encourage you to check out these GitHub docs.
These 9 commands are absolutely the BASIC ones you will most likely use for this project repo, and they will also apply to your own personal projects.
git init
Initializes
git
and begins the process for adding your files to version control.
git clone
Makes an exact duplicate on your computer of a repository online - complete with all history of file revisions.
git add
Tells
git
that a file has been modified and has now been added to version control.
git commit
Inserts a comment in the histroy of a file (or multiple files) stating what was modified, added, or delete.
git status
Displays what has been recently modified, added, or deleted.
git log
Displays all commit messages and their unique hash, the author, date of commit, and commit message.
git branch
Displays the current working branch (by default called
main
ormaster
).It is a common practice to have more than one branch where other work is being done without "breaking" the original environment in
main
.
git merge
Another branch can be created to make many edits to many files in a safe environment without altering the original files in
main
and latermerge
them together.This is commonly done when adding new Features to
main
or Bug-Fixing.
git pull
When files are modified to the online reposity, they can be synced with the local repository.
git push
When files are modified to the local repository, they can be synced with the online repository.
readme.md
is in a constant state of revision. If you spot any errors, please let me know.Here's a link to the previous version of this README.md
renamed LearnGIT.md.