-
-
Save the100rabh/ab68636e0814ee1de959 to your computer and use it in GitHub Desktop.
Cheatsheets
git config user.name "Your Name Here"
git config user.email [email protected]
git branch --track feature1 origin/master
git diff --name-status origin/master..
git reset --soft HEAD^
git diff branch-a branch-b
git checkout <commit-hash> path/to/file.ext
git checkout branch-name -- /path/to/file.ext
git push origin branch-a
git checkout --track -b local-branch-name origin/remote-branch-name
or
git branch --track local-branch-name origin/remote-branch-name
git pull local-branch-name
git push origin newfeature
git push origin --delete [branch-name]
or
git push origin :branch-name
git status
Fix conflicts and then:
git add path/to/file.ext
git rebase --continue
git rebase --abort
git rev-list -n 1 HEAD -- <file_path>
git checkout <deleting_commit>^ -- <file_path>
git diff HEAD^ origin/master --name-status
# h1
## h2
### h3 you may 'close' hashes ###
#### h4 (thru h6)
this is also an h1
======
this is also an h2
------
> blockquote style one la la la
i am still part of this blockquote
> another style of marking up
> blockquotes. this is email style
> quoting. blockquotes can be nested.
these are all unordered lists:
* proto - proto + proto
* exo - exo + exo
* auxo - auxo + auxo
these are all ordered lists:
1. proto 1. proto 1. proto
2. exo 4. exo + exo
3. auxo 3. auxo + auxo
horizontal rules: (three or more)
* * *
***
*****
- - -
------------------------
a link:
[link text](http://yoursite.com/ "title")
[link text no title](http://anothersite.com/)
<[email protected]> will obfuscate your link a bit
an image:


emphasis:
*hello* or _hello_ produces italicized [em] text
**hello** or __hello__ produces bold [strong] text
\*how to surround text with actual asterisks\*
markdown provides backslash escapes for the following characters:
\ backslash
` backtick
* asterisk
_ underscore
{} curly braces
[] square brackets
() parentheses
# hash mark
+ plus sign
- minus sign (hyphen)
. dot ! exclamation mark
Making a table ( Multimarkdown )
| Header | Another Header |
| --------- | -------------------- |
| Data | More Data |
| Extra | Additional Data |
- Signed 128 to 127
- Unsigned 0 to 256
- Signed -32,768 to 32,767
- Unsigned 0 to 65,535
- Signed -8,388,608 to 8,388,607
- Unsigned 0 to 16,777,215
- Signed -2,147,483,648 to 2,147,483,647
- Unsigned 0 to 4,294,967,295
- Signed -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
- Unsigned 0 to 18,446,744,073,709,551,615
INSERT INTO `new_table` (`id`)
SELECT `id` FROM `old_table`;
ALTER TABLE `table`
MODIFY `id` INT(10) UNSIGNED NOT NULL,
MODIFY `big_id` BIGINT(20) UNSIGNED NOT NULL;
RENAME TABLE `old_table` TO `new_table`;
CREATE TABLE `new_table_compressed` (
`id` int(10) UNSIGNED NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
ALTER TABLE `table_compressed` ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment