Git-Einführung: Welche wichtigen Git Befehle (Git Commands) gibt es - wie beispielsweise «Git Commit», «Git Add», «Git Diff» oder «Git Stash»?
Git introduction: Which important Git commands are there - such as "Git Commit", "Git Add", "Git Diff" or "Git Stash"?
When working in Git, "save" is more nuanced than in a word processing program and includes a collection of files and directories. Save is a synonym for the Git term "commit" - for save it is "commit". The Git command "Git Commit" can be used to capture a snapshot of the currently deployed changes to the project. Such committee snapshots are considered safe versions, as Git only makes changes on explicit instruction. Before the "Git Commit" command, the "Git Add" command is required to save changes in a commit, to promote them to the project in the staging environment or to "stage" them. As a result, the Git commands "Git Commit" in combination with the "Git Add" command are among the most frequently used and form the basic Git workflow. This is followed by the "Git Status" command to retrieve the status of the working directory and the staging environment. The "Git Stash" command, on the other hand, causes changes to the working copy to be temporarily postponed (or stashed). This allows the programmer to focus on other tasks and apply the changes later. This is practical if the programmer is in the middle of a code change, is not yet ready to commit and needs to quickly continue working on something completely different.
A short Git tutorial explains how Git works:
- Create a "repository" project with a Git hosting tool such as Bitbucket
- copy or clone the repository to your local system
- add a file to the local repository and perform a "commit" for the changes to "save"
- Move changes to your master branch via "Push"
- make a change to the file with a Git hosting tool and commit it
- perform a "pull" to apply the changes to your local system
- create a "Git branch" (a Git version), make a change and commit it
- Open a "pull request" (change proposals for the master branch)
- perform a "merge" of the changes in the master branch
Git introduction, Git commands and installing Git are taught in a Git course.