Skip to content

Latest commit

 

History

History
71 lines (48 loc) · 1.08 KB

common-commands.md

File metadata and controls

71 lines (48 loc) · 1.08 KB

Common Commands

This file continas several commands for various CLI's

Git

Getting a new version of the repository on your local machine

git clone https://github.com/sleslein/my-repository.git

Getting the latest version of the current branch

git pull

Committing work to an existing branch

git add -A
git commit -m "message"
git push

Pushing a new branch to github

git push --set-upstream origin my-new-branch-name

Create a new brach off current

git checkout -b [branchName]

Removing local branches which have been removed from the remote server

git branch | grep -v "master" | xargs git branch -d

General

Edit Bash RC The following command will open the .bashrc in VS Code.

.eb

It is an alias for the followng

alias .eb='code ~/.bashrc'

Update Bash RC Source After editing the .bashrc file, this command will update the alises

.sb

It is an alias for the followng

alias .sb='source ~/.bashrc'