Skip to content

Instantly share code, notes, and snippets.

View tokyopdm's full-sized avatar

Christine tokyopdm

View GitHub Profile
@chriswain
chriswain / ninjamultipedia.txt
Last active September 6, 2020 09:46
basic git concepts
git add . //the dot adds all the files
git add filename // add specific file to commit
git status //gives current files modified but not committed
git diff filename // so changes to the file since last time file was committed
git commit -m “add message about commit here”
git push -u origin branch //need to use this for initial commit to that branch
git push //if already pushed to branchname
git stash // will store current work and push you back to most recent working directory
git checkout -b branchname //will create new branch and check you into it
git checkout branchname //will check you into already created branch
@ummahusla
ummahusla / git-overwrite-branch.sh
Last active May 20, 2024 16:27 — forked from brev/git-overwrite-branch.sh
Git overwrite branch with another branch
# overwrite master with contents of feature branch (feature > master)
git checkout feature # source name
git merge -s ours master # target name
git checkout master # target name
git merge feature # source name