0% found this document useful (0 votes)
1K views1 page

3.git Cheat Sheet (Dark) in VS COde

This document provides a git cheat sheet that summarizes how to install git, configure a user, create and manage repositories and branches, synchronize changes between a local and remote repository, and outlines some common git terminology like commit, clone, remote, fork, and pull request. It also provides a simple visual of the typical git flow process of creating a feature branch off master, committing changes to that branch, submitting a pull request for review, and then merging the feature branch into master.

Uploaded by

Venky
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views1 page

3.git Cheat Sheet (Dark) in VS COde

This document provides a git cheat sheet that summarizes how to install git, configure a user, create and manage repositories and branches, synchronize changes between a local and remote repository, and outlines some common git terminology like commit, clone, remote, fork, and pull request. It also provides a simple visual of the typical git flow process of creating a feature branch off master, committing changes to that branch, submitting a pull request for review, and then merging the feature branch into master.

Uploaded by

Venky
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

VS Code SuperHero

git cheat sheet

Install Create Repositories


GitHub for Windows Create repositories locally, then push to GitHub. Or
clone an existing repository.
https://windows.github.com
$ git init
GitHub for Mac
$ git clone [url]
https://mac.github.com
Git for All Platforms Branches
http://git-scm.com Branches allow you to work on new features safely
without altering the master branch.
Configure $ git branch [branch-name]

Configure user information for local repositories $ git checkout [branch-name]

$ git merge [branch]


$ git config --global user.name “[name]”

$ git config --global user.email “[email address]”


Synchronize Changes
Synchronize your local repository with the remote
The .gitignore File repository on GitHub.
Use this to exclude files from beging tracked by Git. $ git fetch

$ git merge

$ git push

Glossary
$ git pull

git: an open source, distributed version-control system


GitHub: a platform for hosting and collaborating on Git repositories
commit: a Git object, a snapshot of your entire repository
branch: a lightweight movable pointer to a commit
clone: a local version of a repository, including all commits and branches
remote: a common repository on GitHub that all team member use to exchange their changes
fork: a copy of a repository on GitHub owned by a different user
pull request: a place to compare and discuss the differences introduced on a branch with reviews, comments, integrated
tests, and more

git flow
“master” branch
Create “feature” branch from “master” Merge “feature” branch into “master”

Commit changes Review and approve changes


Submit pull request

You might also like