Skip to content

SolarMotion/command-git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-command

  1. Delete local repo from .git version control (Windows run inside Bash)
rm -rf .git
  1. Create a new repo
git init
  1. Checkout repo from remote
git clone /path/to/repository
  1. Add
git add .
  1. Commit to local
git commit -m "Commit message"
  1. Push changes to remote
git push
  1. Create a new branch named "feature_x" and switch to it using
git checkout -b feature_x
  1. Delete the branch
git branch -d feature_x
  1. Get latest local master branch from remote
git pull
  1. Merge local branch (cd to master first)
git merge <branch>
  1. View git logging in summary
git log --oneline
  1. Discard all local changes to all files permanently
git reset --hard
  1. Add file to .gitignore and remove existing check-in
git reset file_name_x <br/>
git rm --cached file_name_x <br/>
[Stackoverflow example](https://stackoverflow.com/a/4308645/2965356) 
  1. Sample
* feature: add claimUsername test helper
* test: ensure that username is at least 5 characters long
* test: ensure that in-use username cannot be claimed
* refactor: have registerNewTestUser use claimUsername
* refactor: have completeUserOnboarding use claimUsername
* style: Feature and updates related to styling
* docs: Everything related to documentation
* chore: Regular code maintenance.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors