Sunday, December 7, 2014

Adding new Files to Stage/Index

In the previous post Cloning Bitbucket Repository using SourceTree we created a repository in Bitbucket and cloned a copy of the repository to the local PC, in this post we shall see on how to add local files from the local machine to Stage / Index.

Follow the below steps to create a new file in the local machine and add them to staging/index.

1. Create a local working Directory pointing to “C:\GitDocuments”
2. Let us create a folder and add some files to the Working Directory
3. I have created a folder called Git Resources and added a file called Git Overview.docx in the folder, under the working directory.

4. Once this is done, the newly added files will get reflected in the “Working Copy Changes” panel of Source Tree.


5. Right click on the newly added files and select Add to index (or) select and drag the files from the “Working Copy Changes” panel to the “Staged Changes” panel.
6. This will move the file to Stage / Index.


This action can be rolled back by selecting the files from the Staged Panel and selecting “Unstage from Index” or by dragging the files from the “Staged Changes” panel to the “Working Copy Changes” panel


Search Flipkart Products:
Flipkart.com

No comments: