Git - Dark
Git - Dark
Omit
stash@{n} to delete last stash made
Rebase feature branch onto main (to List new or modified files not yet
incorporate new changes made to committed $ git stash drop stash@{1}
Setup Branches main). Prevents unnecessary merge
$ git status Delete all stashes
Set the name and email that will be commits into feature, keeping history
List all local branches. Add -r flag to
attached to your commits and tags clean List commit history, with respective $ git stash clear
show all remote branches. -a flag for
all branches. IDs
$ git config --global
user.name "Danny Adams" $ git branch $ git log --oneline
Synchronizing
$ git config --global
Create a new branch Show changes to unstaged files. For
user.email "my- Add a remote repo
changes to staged files, add --cached
email@gmail.com"
$ git branch <new-branch> $ git checkout feature option $ git remote add <alias>
$ git rebase main <url>
Start a Project Switch to a branch & update the
working directory Interatively clean up a branches
$ git diff
View all remote connections. Add -v
Create a local repo (omit <directory> commits before rebasing onto main Show changes between two commits flag to view urls.
to initialise the current directory as a $ git checkout <branch>
git repo $ git rebase -i main $ git diff commit1_ID $ git remote
Create a new branch and switch to it
commit2_ID
Interatively rebase the last 3 commits Remove a connection
$ git init <directory> $ git checkout -b <new- on current branch
Download a remote repo
branch> Stashing $ git remote remove <alias>
$ git rebase -i Head~3
Delete a merged branch Store modified & staged changes. To Rename a connection
$ git clone <url> include untracked files, add -u flag.
$ git branch -d <branch>
Undoing Things For untracked & ignored files, add -a $ git remote rename <old>
By @DoableDanny $ git merge --squash a $ git reset <commit_ID> $ git stash show stash@{1}