Git Commands
Start with Git
Git Commands and Their Explanations
| Git Command | Description |
|---|---|
git init | Initialize a New Git Repository |
git add . | Add Files to the Repository |
git commit -m "Initial commit" | Commit Changes |
git remote add origin #repository_URL# | Link to a Remote Repository |
git push -u origin master | Push Changes to GitHub |
Branching and Merging
| Git Command | Description |
|---|---|
git checkout -b #branch_name# | Create and Switch to a New Branch |
git checkout #branch_name# | Switch to an Existing Branch |
git merge #source_branch# | Merge Changes from Another Branch |
warning
Create always a new working branch