PROJECTS NEWS STORE LABS GIT SIGN UP LOGIN LOGOUT ROKOJORI NEWSLETTER SIGN UP LOGIN LOGOUT PROJECTS NEWS STORE LABS GIT TOGGLE FULLSCREEN VOLLBILD AN/AUS image/svg+xml image/svg+xml image/svg+xml GIT GUIDE
Most needed commands
image/svg+xml image/svg+xml Most needed commands image/svg+xml



image/svg+xml image/svg+xml image/svg+xml Overview Overview FETCH: Update online history git fetch STATUS: What is going on? git status ADD: Mark files for saving git add . COMMIT: Save snapshot git commit -m "{Snap Shot Name}" PUSH: Upload/share local history git push CHECKOUT: Switch branch git checkout {BRANCHNAME} PULL: Download online history and merge with local git pull MERGE: Merge branches git merge {BRANCHNAME} DIFF: Show merge conflicts git diff --name-only --diff-filter=U --relative Overview Overview FETCH: Update online history git fetch STATUS: What is going on? git status ADD: Mark files for saving git add . COMMIT: Save snapshot git commit -m "{Snap Shot Name}" PUSH: Upload/share local history git push CHECKOUT: Switch branch git checkout {BRANCHNAME} PULL: Download online history and merge with local git pull MERGE: Merge branches git merge {BRANCHNAME} DIFF: Show merge conflicts git diff --name-only --diff-filter=U --relative image/svg+xml image/svg+xml image/svg+xml fetch fetch Official documentation: git fetch Always safe to use Overview EXAMPLE git fetch WHAT IT DOES Downloads and updates the project history with all it branches and snap shots from the server into a hidden directory. It does not change the files of the local active state
WHEN TO USE Everytime before you want to download the current states of any branches or snapshots and also when you want to upload something. Makes also sense before using git status.
fetch fetch Official documentation: git fetch Always safe to use Overview EXAMPLE git fetch WHAT IT DOES Downloads and updates the project history with all it branches and snap shots from the server into a hidden directory. It does not change the files of the local active state
WHEN TO USE Everytime before you want to download the current states of any branches or snapshots and also when you want to upload something. Makes also sense before using git status.
image/svg+xml image/svg+xml image/svg+xml status status Official documentation: git status Always safe to use Overview EXAMPLE git status WHAT IT DOES Gives the name about the current local branch and its snapshot and its relation to its online pendant: Are they different and is one more up to date?
It also list all files that changed (untracked) and the changed files that are picked to be included (staged) for the next snap shot (commit)
WHEN TO USE Everytime you want to know something about the current branch, either to see which local changes exists to the snapshot it is based on or its relation to the online version.
status status Official documentation: git status Always safe to use Overview EXAMPLE git status WHAT IT DOES Gives the name about the current local branch and its snapshot and its relation to its online pendant: Are they different and is one more up to date?
It also list all files that changed (untracked) and the changed files that are picked to be included (staged) for the next snap shot (commit)
WHEN TO USE Everytime you want to know something about the current branch, either to see which local changes exists to the snapshot it is based on or its relation to the online version.
image/svg+xml image/svg+xml image/svg+xml add add Official documentation: git add Caution: Use only before saving Overview EXAMPLES git add . git add "{path/to/something}" WHAT IT DOES Depending on the current working directory of the CMD/terminal it will mark all changed files of the path and mark them - they are staged. These marked files will be included in the next snapshot (commit). Using only a dot takes all files from the current working directory. WHEN TO USE Before you want to save/create a snapshot (commit). You can see which files are marked as staged with git status. add add Official documentation: git add Caution: Use only before saving Overview EXAMPLES git add . git add "{path/to/something}" WHAT IT DOES Depending on the current working directory of the CMD/terminal it will mark all changed files of the path and mark them - they are staged. These marked files will be included in the next snapshot (commit). Using only a dot takes all files from the current working directory. WHEN TO USE Before you want to save/create a snapshot (commit). You can see which files are marked as staged with git status. image/svg+xml image/svg+xml image/svg+xml commit commit Official documentation: git commit Caution: Use to save a snapshot Overview EXAMPLES git commit -m "{Snap Shot Name}" WHAT IT DOES Saves all marked files into a snapshot - a commit. WHEN TO USE If you want save to current state as logical unit. commit commit Official documentation: git commit Caution: Use to save a snapshot Overview EXAMPLES git commit -m "{Snap Shot Name}" WHAT IT DOES Saves all marked files into a snapshot - a commit. WHEN TO USE If you want save to current state as logical unit. image/svg+xml image/svg+xml image/svg+xml push push Official documentation: git push Caution: Use only to upload Overview EXAMPLES git push WHAT IT DOES Uploads all snapshot (commits) to the server WHEN TO USE When you want to save your local snapshots online and want to share them with others. push push Official documentation: git push Caution: Use only to upload Overview EXAMPLES git push WHAT IT DOES Uploads all snapshot (commits) to the server WHEN TO USE When you want to save your local snapshots online and want to share them with others. image/svg+xml image/svg+xml image/svg+xml checkout checkout Official documentation: git checkout Caution: Use only without pending changes Overview EXAMPLES git checkout {BRANCHNAME} WHAT IT DOES Adds and remove files from the current state to match the most current state (commit) of the "checked out" branch. WHEN TO USE When you want to switch the history branch of the project - to see another version with different features or workstates of others. checkout checkout Official documentation: git checkout Caution: Use only without pending changes Overview EXAMPLES git checkout {BRANCHNAME} WHAT IT DOES Adds and remove files from the current state to match the most current state (commit) of the "checked out" branch. WHEN TO USE When you want to switch the history branch of the project - to see another version with different features or workstates of others. image/svg+xml image/svg+xml image/svg+xml pull pull Official documentation: git pull Caution: Use only without pending changes Overview EXAMPLES git pull WHAT IT DOES Downloads the online history and add/remove files to match the recent online state (commit) of the current branch. WHEN TO USE When you want to update to the latest state of a branch. pull pull Official documentation: git pull Caution: Use only without pending changes Overview EXAMPLES git pull WHAT IT DOES Downloads the online history and add/remove files to match the recent online state (commit) of the current branch. WHEN TO USE When you want to update to the latest state of a branch. image/svg+xml image/svg+xml image/svg+xml merge merge Official documentation: git merge Caution: Use only without pending changes Overview EXAMPLES git merge {BRANCHNAME} WHAT IT DOES It adds, changes, and removes files to combine the newest versions of the current branch and the merging branch. If there are files that have new seperate changes in both branches a merge conflict arises. Merge conflicts are sometimes resolved automatically, but should be double checked manually. WHEN TO USE When you want to combine two (or multiple) project states into one that contains all states. merge merge Official documentation: git merge Caution: Use only without pending changes Overview EXAMPLES git merge {BRANCHNAME} WHAT IT DOES It adds, changes, and removes files to combine the newest versions of the current branch and the merging branch. If there are files that have new seperate changes in both branches a merge conflict arises. Merge conflicts are sometimes resolved automatically, but should be double checked manually. WHEN TO USE When you want to combine two (or multiple) project states into one that contains all states. image/svg+xml image/svg+xml image/svg+xml diff diff Official documentation: git diff Overview EXAMPLES git diff --name-only --diff-filter=U --relative WHAT IT DOES It outputs the names of all unmerged files of the current working states. WHEN TO USE When you merged two brances and want to know which files are still not resolved/merged. diff diff Official documentation: git diff Overview EXAMPLES git diff --name-only --diff-filter=U --relative WHAT IT DOES It outputs the names of all unmerged files of the current working states. WHEN TO USE When you merged two brances and want to know which files are still not resolved/merged. TO GIT OVERVIEW








SAY ALSO HI ON SOCIAL MEDIA


All social media brands are registrated trademarks and belong to their respective owners.




CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com