mirror of
https://github.com/LeCoupa/awesome-cheatsheets.git
synced 2026-01-28 14:18:12 -08:00
Compare commits
6 Commits
0024e9043e
...
6140b15f2b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6140b15f2b | ||
|
|
10872e02d1 | ||
|
|
365b4f72b7 | ||
|
|
0f74ebe37b | ||
|
|
bf4c0379f2 | ||
|
|
cf584f84f7 |
@@ -149,6 +149,7 @@ Operators
|
|||||||
^= bitwise exclusive or and store
|
^= bitwise exclusive or and store
|
||||||
|= bitwise or and store
|
|= bitwise or and store
|
||||||
, separator as in ( y=x,z=++x )
|
, separator as in ( y=x,z=++x )
|
||||||
|
; statement terminator.
|
||||||
|
|
||||||
|
|
||||||
Operator precedence
|
Operator precedence
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# DOCKER
|
# DOCKER
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
docker init # Creates Docker-related starter files
|
||||||
docker build -t friendlyname . # Create image using this directory's Dockerfile
|
docker build -t friendlyname . # Create image using this directory's Dockerfile
|
||||||
docker run -p 4000:80 friendlyname # Run "friendlyname" mapping port 4000 to 80
|
docker run -p 4000:80 friendlyname # Run "friendlyname" mapping port 4000 to 80
|
||||||
docker run -d -p 4000:80 friendlyname # Same thing, but in detached mode
|
docker run -d -p 4000:80 friendlyname # Same thing, but in detached mode
|
||||||
|
|||||||
@@ -31,14 +31,18 @@ git branch # shows all the branches (current branch is s
|
|||||||
git branch -a # shows all the branches local and remote
|
git branch -a # shows all the branches local and remote
|
||||||
|
|
||||||
git branch my-branch # creates my-branch
|
git branch my-branch # creates my-branch
|
||||||
|
git checkout -b my-branch # create and switches to my-branch
|
||||||
|
git switch -c my-branch # create and switches to my-branch
|
||||||
git branch -d my-branch # deletes my-branch
|
git branch -d my-branch # deletes my-branch
|
||||||
git checkout my-branch # switches to my-branch
|
git checkout my-branch # switches to my-branch
|
||||||
|
git switch my-branch # switches to my-branch
|
||||||
git merge my-branch # merges my-branch to current branch
|
git merge my-branch # merges my-branch to current branch
|
||||||
git push origin --delete my-branch # delete remote branch
|
git push origin --delete my-branch # delete remote branch
|
||||||
git branch -m <new-branch-name> # rename the branch
|
git branch -m <new-branch-name> # rename the branch
|
||||||
git checkout --orphan <branch_name> # checkout a branch with no commit history
|
git checkout --orphan <branch_name> # checkout a branch with no commit history
|
||||||
git branch -vv # list all branches and their upstreams, as well as last commit on branch
|
git branch -vv # list all branches and their upstreams, as well as last commit on branch
|
||||||
git branch -a # List all local and remote branches
|
git branch -a # List all local and remote branches
|
||||||
|
git restore # Restore specified paths in the working tree
|
||||||
|
|
||||||
git cherry-pick <commit_id> # merge the specified commit
|
git cherry-pick <commit_id> # merge the specified commit
|
||||||
git cherry-pick <commit_id_A>^..<commit_id_B> # pick the entire range of commits where A is older than B ( the ^ is for including A as well )
|
git cherry-pick <commit_id_A>^..<commit_id_B> # pick the entire range of commits where A is older than B ( the ^ is for including A as well )
|
||||||
|
|||||||
Reference in New Issue
Block a user