Skip to content

This repo holds an overview of git commands and processes. I put this together as a helper repository.

Notifications You must be signed in to change notification settings

thatjsprof/git_principles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 

Repository files navigation

Git helper methods

Starting a new project

git init
git add .
git commit -m "<your-commit-message>"
git branch -M main
git remote add origin https://github.com/<your-github-username>/<repository-name.git>

Joining an existing repository: There are 2 ways to do this

  1. Forking the repo from your github dashboard
  2. Cloning the repo from your github dashboard or running the command below from the folder:

git clone <repository-path>

To add a single file use

git add <file-name> To add files recursively use git add .

To make a new commit use:

git commit The above command would open an editor in your terminal. Type in your commit message and ctrl + save to save your changes then ctrl + w to quit the editor. To add all changed files and commit automatically use: git commit -am <your-commit-message>

To update changes on github to your local machine use:

git pull origin <branch-name>

To push changes on your local machine to github use

git push origin <branch-name>

About

This repo holds an overview of git commands and processes. I put this together as a helper repository.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published