PCSX2 Documentation/Git Survival Guide: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
There are a lots of guides/docs on internet but they are too big and confusing. You will find here a mini guide to use git with a minimal number of commands and parameters. You won't find any details or explications of git's internal mechanisms here.
There are a lot of guides/docs on the internet but they are too big and confusing. You will find here a mini guide to use git with a minimal number of commands and parameters. You won't find any details or explications of git's internal mechanisms here.


==Git Guide==
==Git Guide==
Line 17: Line 17:


===Stash or how to save your precious work===
===Stash or how to save your precious work===
Stash is very useful. For example, your will use it before/after (push/pop) merge/rebase action  
Stash is very useful. For example, you will use it before/after (push/pop) merge/rebase action  
* Push pending update on the stack: <code>git stash</code>
* Push pending update on the stack: <code>git stash</code>
* Get back your update: <code>git stash pop</code>
* Get back your update: <code>git stash pop</code>
Line 34: Line 34:
* Switch to another branch: <code>git checkout <branch></code>
* Switch to another branch: <code>git checkout <branch></code>
* Creates: git branch <code><branch></code>
* Creates: git branch <code><branch></code>
* Delete branches: git branch -d <code><branch></code>
* Delete branches: <code>git branch -d <branch></code>
* Set the base reference of the branch (for rebase): git branch --set-upstream-to=<code><remote><branch_name></code>
* Set the base reference of the branch (for rebase): <code>git branch --set-upstream-to=<remote><branch_name></code>


==Git use case example==
==Git use case example==
Line 56: Line 56:
* Unstage: <code>git reset HEAD --</code>
* Unstage: <code>git reset HEAD --</code>


At this stage of operation, you get all your change in local file but nothings is ready to be committed.  
'''At this stage of operation, you have all your changes in the local file but nothing is ready to be committed.'''


Repeate the 2 next commands for each new commits that you want to create
Repeat the 2 next commands for each new commit that you want to create
* staged your change with dynamic selection: <code>git add/rm -p <file></code>
* staged your change with dynamic selection: <code>git add/rm -p <file></code>
* commit your change: <code>git commit</code>
* commit your change: <code>git commit</code>
Line 64: Line 64:
Once you have finished to split your commit:
Once you have finished to split your commit:
* finish the rebase: <code>git rebase --continue</code>
* finish the rebase: <code>git rebase --continue</code>
{{PCSX2 Documentation Navbox}}
ninja
782

edits

Navigation menu