Skip to content

pbatra0/learn_git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 

Repository files navigation

Demo

Repo for the seminar I conducted to teach git and GitHub.

Installation

For windows download from here.

For MacOs use this link.

For Ubuntu:

sudo apt-get install git

Configure your name and email address

git config --global user.name "Name"
git config --global user.email "[email protected]"

To generate ssh for authentication:

#Create an ssh key
ssh-keygen -t rsa -b 4096 -C "[email protected]"
#change the key name if you want to
# Add a paraphrase if you want to

Execute the command below then copy the public ssh key and paste it into your GitHub account under Settings>SSH and GPG keys.

cat ~/.ssh/id_rsa.pub

In your local machine, check if the ssh-agent is running by executing:

eval "$(ssh-agent -s)"

Add ssh key to local ssh agent:

ssh-add ~/.ssh/id_rsa

Done.

Basics

  • clone
  • add
  • commit
  • status
  • reset
  • revert
  • checkout
  • push
  • pull
  • diff
  • merge (to demonstrate: master and features)

Workflow

  • master (main branch to merge all the features and issues)
    • feature branches
  • qa ( perform tests before merge into staging)
  • prod (Real production workload)
    • hotfixes ( quick fixes on production code)
  • staging ( - duplicate of prod for blue/green deployment)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages