How do you send changes from local Git repository to remote repository?
Experience Level:
Junior
Tags:
Git
Source control
Answer
In order to send changes from your local Git repository to a remote repository, run the git push
command?
The following sequence of commands is usually used in the basic Git workflow:
- Use
git status
to see what are the changes in your workspace, in other words what files were added, changed or deleted - Use
git add .
to add all changes from workspace to index (stage) - Use
git commit -m "Change description"
to commit all changes from index (stage) to your local repository - Use
git push
to send all commits that weren't sent previously to a remote repository
Related Git job interview questions
-
What is a difference between local and remote repository?
Git Source control Junior -
How do you create local Git repository?
Git Source control Junior -
What is a Git repository?
Git Source control Junior -
What is Git?
Git Source control Junior -
What are the major benefits of using Version Control System (VCS)?
Git Source control Junior