0-readme edit

git-cheatsheet  edit

Git command cheatsheet
Git cheatsheet
Name Examples
git status See what files have been changed
git branch View all branches
git checkout -b branchName Create and switch to new branch
git branch -d branchName Delete branch that has been merged
git branch -D branchName Delete branch that has not been merged
git pull origin branchName Pull updates from server
git push origin branchName Push updates to server
git revert commit-id-to-revert Revert to certain commit
git branch --merged branchName List branches that have been merged into branchName
git branch --merged List branches merged into HEAD (i.e. tip of current branch)
git branch --no-merged List branches that have not been merged.
git cherry-pick commitSHA Merge a single commit from another branch
Copy
Edit
<!-- components/0-readme/git-cheatsheet.php --> <div class="cheatsheet"> <h5>Git command cheatsheet</h5> <table class="cheatsheet_item tablespecial"> <caption>Git cheatsheet</caption> <tbody> <tr> <th>Name</th> <th>Examples</th> </tr> <tr> <td> <code>git status</code> </td> <td>See what files have been changed</td> <tr> <td> <code>git branch</code> </td> <td>View all branches</td> <tr> <td> <code>git checkout -b branchName</code> </td> <td>Create and switch to new branch</td> <tr> <td> <code>git branch -d branchName</code> </td> <td>Delete branch that has been merged</td> <tr> <td> <code>git branch -D branchName</code> </td> <td>Delete branch that has not been merged</td> <tr> <td> <code>git pull origin branchName</code> </td> <td>Pull updates from server</td> <tr> <td> <code>git push origin branchName</code> </td> <td>Push updates to server</td> <tr> <td> <code>git revert commit-id-to-revert</code> </td> <td>Revert to certain commit</td> <tr> <td> <code>git branch --merged branchName</code> </td> <td>List branches that have been merged into branchName</td> <tr> <td> <code>git branch --merged</code> </td> <td>List branches merged into HEAD (i.e. tip of current branch)</td> <tr> <td> <code>git branch --no-merged</code> </td> <td>List branches that have not been merged.</td> <tr> <td> <code>git cherry-pick commitSHA</code> </td> <td>Merge a single commit from another branch</td> </tr> </tbody> </table> </div>
Copy
Copy
Edit
/* scss/0-readme/_git-cheatsheet.scss */