Sunday, November 30, 2014

Committing changes to a local repository using Git Bash

Once the local changes in the working copy are staged/indexed, the next step is to commit the changes to the local repository this will move the changes from staging to the local repository.

Working Copy changes -> Stage/Index -> Commit to Local Repository -> Push to Remote Repository

Use the following steps to commit the changes from stage/index to the local repository

1.    Open Git Bash
2.    Navigate to the working folder in which the changes to be committed are to be done using the cd command.
a.    cd c:\\GitWorkingFolder\\documents
3.    Add / modify files in the working folder, I have added a new file “Git Bash.docx”
4.    Run the “git add .” command to move the changes to staging
5.    Run the “git commit” command to commit the changes
Once done, all staged changes will be committed to the local repository.

Search Flipkart Products:

No comments: