Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple GIT manual #61

Open
marco-biasion opened this issue Jul 10, 2024 · 0 comments
Open

Simple GIT manual #61

marco-biasion opened this issue Jul 10, 2024 · 0 comments
Labels
type > documentation Improvements or additions to documentation

Comments

@marco-biasion
Copy link
Member

marco-biasion commented Jul 10, 2024

Commands

git add FILE1 [FILE2 ...]
This command stages the changes made on those FILE[S]. (mark them as "to be committed")

git commit -m "MESSAGE" [--amend]
This command commits the staged changes with the given MESSAGE.
If the flag --amend is used, it updates the latest commit instead of creating a new one.

git status
This command prints some status informations:
-> The local branch is behind/ahead/up-to-date with the remote
-> A list of all staged/tracked/untracked changes.

git fetch
This command updates the local references and objects.

git push
This command updates the remote references and objects.

git merge OTHER_BRANCH
This command joins OTHER_BRANCH to the current one. (imports all OTHER_BRANCH changes to the current one)

git pull [--rebase]
This command is equivalent to doing a git fetch and then git merge origin/LOCAL_BRANCH.
If the flag --rebase is used, it appends the local history after the remote one instead of merging the two histories.

git log
This command shows the commit logs

Commit message standard

When doing a commit, your message should always start with #ID where ID is the numerical id of the issue it relates to.
For example when creating a commit on a branch called 42-bug-papaya your message should be like "#42: banana kiwi".

Pronunciation

GIT is pronunced /ɡɪt/
/ɡ/ as in Give
/ɪ/ as in shIp
/t/ as in Town

@marco-biasion marco-biasion added the type > documentation Improvements or additions to documentation label Jul 10, 2024
@marco-biasion marco-biasion pinned this issue Aug 19, 2024
@Francesco-Cos Francesco-Cos unpinned this issue Aug 28, 2024
@marco-biasion marco-biasion pinned this issue Aug 28, 2024
@Francesco-Cos Francesco-Cos unpinned this issue Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type > documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant