How do you send changes from local Git repository to remote repository?
Experience Level: Junior
Tags: GitSource 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?
GitSource control JuniorHow do you create local Git repository?
GitSource control JuniorWhat is a Git repository?
GitSource control JuniorWhat is Git?
GitSource control JuniorWhat are the major benefits of using Version Control System (VCS)?
GitSource control Junior