Repository used to store useful git resources and basic git commands.
- https://shields.io/
Fun shields with custom colors, icons and styles.
For example: - https://simpleicons.org/
List icons/logos for shield.io images. - https://github.com/anuraghazra/github-readme-stats
Generates quick stats animated image - https://github.com/ashutosh00710/github-readme-activity-graph
Generates a fun graph showing github activity - https://youtu.be/Uszj_k0DGsg
Very useful video covering how to use git professionally. - Git Workflow Strategies
Some useful rules and strategies - Git Cheat Sheet
A list of basic git commands - Commonly Used Emojis
A list of some of my favorite emojis
- Commits should only include changes from the same topic in a single commit.
- Commit message subject: Subject should be concise summary of what happened.
- Commit message body: More detailed explanation (what is now different? Reason, etc...)
- Consider creating a written branch convention to avoid collisions or mistakes.
e.g. Few branches, relatively small commits, high-quality testing & QA standards
- Consider creating long-running and short-lived branches to enhance structures & workflows.
e.g. Release, Dev, Feature, Stages, etcโฆ
- Avoid direct commits. Always push the code to a development brush to be tested and reviewed before committing to it.
- Take inspiration for branching from well structures already existing models such as โGithub Flowโ or โGitFlowโ.
- Pull Requests: Fork (Personal Copy) -> Make Changes -> Make Pull request to include changes.
-
Opens Help Page
git config --help
-
Shows help for specific action
git <verb> --help
git help <verb>
-
Returns Version
git --version
-
Sets Initial Settings
git config --global user.name "FirstName LastName"
git config --global user.email "userEmail"
-
Returns Current Settings
git config --list
-
Initialize Directory
git init
-
Stop Tracking Directory
rm -rf .git
-
Create gitignore File
touch .gitignore
e.g. *.pyc
e.g. .DS_Store -
Check Status of Current Directory
git status
-
Add All Files to Staging Area
git add .
git add -A
-
Add a Files to Staging Area
git add fileName.ext
-
Resets Entire Current Staging Area
git reset
-
Removes Specific File from Staging Area
git reset fileName.ext
-
Commit With Small Message
git commit -m "<message>"
-
Send Committed Files to Repository
git push
-
Show the Current Commit
git log
-
Cloning a Remote Repository
git clone <URL>
git clone <URL> <DIRECTORY>
-
Info about the Repository
git remote -v
-
Returns All Branches
git branch -a
-
Show Changes Since Last Commit
git diff
-
Download Changes (Should Pull after Pushing)
git pull
-
Create Branch
git branch <branch-name>
git branch
git checkout <branch-name>
git checkout -b <branch-name>
(Create and switch to the branch)
-
Changes current remote repository
git remote set-url origin <URL>
git remote set-url origin https*//github.com/TrevisanGMW/hello-world.git
-
Shows difference between old and new file
git diff
-
Creates and Switches to branch for desired feature
git branch <New-Branch-Name>
git checkout <New-Branch-Name>
-
Push to Specific Branch
git push -u origin <New-Branch-Name>
-
Returns Branches that have been merged so far
git branch --merged
-
Merge Another Branch with Current Branch
git merge <Branch-Name>
git push origin master
-
Deleting a Branch
git branch --merged
git branch -d <Branch-Name>
git push origin --delete <Branch-Name>
-
Misc Commands:
git pull origin master
(fetches commits from the master branch)git checkout -b <branch-name>
(-b : new branch)git branch
(tells you what branch you're using)git push origin dev
(pushes to specific branch)git add -p fileName.ext
(Allows for patch level commits)
ico | shortcode | ico | shortcode |
---|---|---|---|
๐ | :joy: |
๐ | :sweat_smile: |
๐ | :wink: |
๐ | :blush: |
๐ฅฐ | :smiling_face_with_three_hearts: |
๐ | :heart_eyes: |
๐คฉ | :star_struck: |
๐ | :kissing_heart: |
๐ | :stuck_out_tongue_winking_eye: |
๐คช | :zany_face: |
๐คจ | :raised_eyebrow: |
๐ค | :thinking: |
๐ | :smirk: |
๐ | :roll_eyes: |
๐ฌ | :grimacing: |
๐ต | :dizzy_face: |
๐ | :sunglasses: |
๐ฅณ | :partying_face: |
๐ค | :nerd_face: |
๐ฑ | :scream: |
๐ฒ | :astonished: |
๐ฎ | :open_mouth: |
๐ฒ | :astonished: |
๐ฎ | :open_mouth: |
๐ป | :ghost: |
๐ | :see_no_evil: |
โค๏ธ | :heart: |
๐ฃ | :bomb: |
๐ | :wave: |
๐ค | :metal: |
๐ | :thumbsup: |
๐ | :raised_hands: |
๐ | :no_good_woman: |
๐ โโ๏ธ | :no_good_man: |
๐คท | :woman_shrugging: |
๐คทโโ๏ธ | :man_shrugging: |
๐ฉโ๐ป | :woman_technologist: |
๐จโ๐ป | :man_technologist: |
๐จโ๐ | :man_astronaut: |
๐ง | :mage: |
๐โโ๏ธ | :running_woman: |
๐โโ๏ธ | :running_man: |
๐ฆ | :raccoon: |
๐ฃ | :footprints: |
๐ง | :penguin: |
๐น | :hamster: |
๐ฆ | :parrot: |
๐ฆ | :duck: |
๐ | :snake: |
๐ฆ | :sauropod: |
๐ | :octopus: |
๐ณ | :whale: |
๐ท๏ธ | :spider: |
๐ธ๏ธ | :spider_web: |
๐ท | :tulip: |
๐ | :maple_leaf: |
๐ | :watermelon: |
๐ | :cherries: |
๐ฅ | :carrot: |
๐ | :eggplant: |
๐ | :meat_on_bone: |
๐ | :poultry_leg: |
๐ | :pizza: |
๐ฆ | :lobster: |
๐ฉ | :doughnut: |
๐ช | :cookie: |
๐ฌ | :candy: |
๐ | :birthday: |
โ | :coffee: |
๐ง | :beverage_box: |
๐ | :earth_americas: |
๐๏ธ | :building_construction: |
๐ | :steam_locomotive: |
๐ | :car: |
๐ | :rocket: |
๐ก๏ธ | :thermometer: |
๐ | :star2: |
๐ | :milky_way: |
โ๏ธ | :snowman_with_snow: |
๐ | :balloon: |
๐ง | :droplet: |
๐ฅ | :fire: |
๐งจ | :firecracker: |
๐ | :tada: |
๐ฎ | :video_game: |
๐ | :confetti_ball: |
๐น๏ธ | :joystick: |
๐ | :gem: |
๐ง | :headphones: |
๐บ | :trumpet: |
๐ | :closed_book: |
๐ | :green_book: |
๐ | :blue_book: |
๐ | :orange_book: |
๐ | :books: |
๐ | :notebook: |
๐ | :scroll: |
๐ | :page_with_curl: |
๐๏ธ | :paintbrush: |
โ๏ธ | :pencil2: |
๐ | :pushpin: |
๐ | :round_pushpin: |
โ๏ธ | :scissors: |
๐ | :key: |
๐จ | :hammer: |
๐ช | :axe: |
โ๏ธ | :pick: |
โ๏ธ | :hammer_and_pick: |
๐ ๏ธ | :hammer_and_wrench: |
๐ซ | :gun: |
โ๏ธ | :gear: |
๐งฐ | :toolbox: |
๐ก | :satellite: |
๐งฌ | :dna: |
๐ | :syringe: |
๐ฉธ | :drop_of_blood: |
๐ | :shopping_cart: |
โข๏ธ | :radioactive: |
โ | :question: |
:bangbang: |
|
โ๏ธ | :heavy_check_mark: |
โ | :x: |
๐ข | :green_circle: |
๐ด | :red_circle: |
๐ดโโ ๏ธ | :pirate_flag: |
:warning: |