You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1.9 KiB

title : git and github basic author: zvevqx published: 2025-11-22 cat: linux desc: ws

...

👾 MOST OF THIS PAGE IS DIRECT OUTPUT OF CHATGPT 3.5

Git and GitHub Basics

What is Git?

Git is a free and open-source version control system that helps you keep track of changes made to your code over time.

What is GitHub?

GitHub is a web-based platform that provides hosting for Git repositories. It also offers many collaboration features such as pull requests, code reviews, and issue tracking.

Getting Started

To get started with Git and GitHub, follow these steps:

  1. Install Git on your computer.
  2. Create a GitHub account.
  3. Open your terminal or command prompt.
  4. Navigate to the directory where you want to create your project.
  5. Initialize a new Git repository using the command git init.

Basic Git Commands

Here are some of the basic Git commands you will need to use:

  • git status - shows the status of your Git repository
  • git add . - adds all changes to the staging area
  • git commit -m "commit message" - commits changes to the local repository with a message
  • git push - pushes changes to the remote repository

Basic GitHub Commands

Here are some of the basic GitHub commands you will need to use:

  • git clone <repository url> - clones a repository to your local machine
  • git pull - pulls changes from the remote repository to your local machine
  • git branch - shows a list of branches in the repository
  • git checkout <branch name> - switches to the specified branch
  • git merge <branch name> - merges the specified branch with the current branch
  • git push <remote> <branch> - pushes changes to a specific remote branch

Conclusion

These are just the basics of Git and GitHub, but they should be enough to get you started with version control and collaborating with others on code. As you continue to use these tools, you will learn more advanced commands and techniques.