jjaimealeman / wdb-get-good-with-git

A collaborative repo for the members of the Udemy course: The Web Developer Bootcamp - by Colt Steele.
https://jjaimealeman.github.io/wdb-get-good-with-git/
MIT License
7 stars 8 forks source link

Welcome to our new repository, where we all learn to get good with 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.

What is this about? What is the objective?

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.

facebookpollscreenshot


What is git?

git.png 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.

What is Github?

github.png 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.


I DO NOT claim to know everything there is to know about 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.


First Steps:

  1. Watch this repo. What is Watching?
  2. Fork this repo. What is Forking?
  3. Clone your repo. What is Cloning

If you are an absolute beginner and know nothing about git, then I encourage you to check out these GitHub docs.


Commands to get your started

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 or master).

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 later merge 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.

I have used these commands for years and I type them a hundred times per day.

Need a cheatsheet? There's lots to learn and memorize 👍

  1. https://www.freecodecamp.org/news/git-cheat-sheet/
  2. https://git-scm.com/docs

This readme.md is in a constant state of revision. If you spot any errors, please let me know.

TEST 👇

Here's a link to the previous version of this README.md renamed LearnGIT.md.