Skip to content

ricardo-hdz/git-intro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git Introduction

Quickstart

git clone https://github.com/ricardo-hdz/git-intro.git
cd git-intro
git pull

Git Basics

1. git checkout

  • git checkout feature_ab
  • Make changes to function ab()
  • git status
  • push changes to feature_ab branch git push origin <branch>

2. git rebase

  • git rebase master
  • resolve conflicts
  • commit merge (after resolving conflicts, do escape :)

3. git stash, git apply

  • Make changes to function ab()
  • git checkout master
  • git stash
  • git checkout master
  • git checkout feature_ab
  • git stash apply

Fork

  • Create a fork of repo
  • Make changes
  • Create PR to main repo

Get changes from upstream

  • git fetch upstream
  • git merge upstream/<branch> <branch>

Create your own branch

git checkout -b <branch_name>

Tools

About

A quick introduction to git commands

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published