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

Comments

No Comments Yet.
Be the first to tell us what you think.
Git for beginners
Git for beginners

Are you learning Git ? Try our test we designed to help you progress faster.

Test yourself
25 Git questions that will help you to nail your job interview
25 Git questions that will help you to nail your job interview

Are you learning Git ? Try our test we designed to help you progress faster.

Test yourself