31,040
edits
| Line 83: | Line 83: | ||
= Commit and publish your changes = | = Commit and publish your changes = | ||
To | To see all changes you made into your working directory and waiting to be added into Git: | ||
* With Eclipse: Right click on file or directory to commit. | * With GIT Command Line Interface: | ||
<source lang="bash"> | |||
git status | |||
git diff subdir/filename | |||
</source> | |||
To add changes made into your local repository into the GIT index, then commit this index : | |||
* With Eclipse: Right click on file or directory to commit. Select file to add and commit. | |||
* With GIT Command Line Interface: | * With GIT Command Line Interface: | ||
<source lang="bash"> | <source lang="bash"> | ||
git commit -a -m "Commit text" | git commit -a -m "Commit text" | ||
</source> | </source> | ||
This will save add and changes into your local branch. | |||
To push them on the GIT repository server, | To push them on the GIT repository server, | ||
| Line 98: | Line 106: | ||
To cancel a commit: | To cancel a commit: | ||
* With GIT Command Line Interface: | |||
<source lang="bash"> | <source lang="bash"> | ||
git revert IdCommit or git revert HEAD (for last | git revert IdCommit or git revert HEAD (for last commit) | ||
</source> | </source> | ||