Good morning.
To make a "push" to a repository you must have confirmed changes in a " commit ". Now if you did not confirm all the changes in a commit you can not do pull or in other words, "download" the changes of your remote server. This happens because when you lower the changes, you would overwrite your unprepared local changes, therefore, you can:
- Do a commit with the changes you have not yet prepared using the
git add
command and then git commit
How to commit
- Ignore the changed non-prepared files to the list of files that are not part of the version control, adding them to the list of .gitignore
How to ignore files
- Discard changes that have not been prepared with
git checkout -- <file> ...
How to undo changes in a file
Because you use SourceTree:
- To commit
- Click on the commit icon in the toolbar.
- In the "Unstaged files" window, click on all the files you will include in the commit.
- Enter the commit message
- Click on commit to prepare your changes.
You can see How to commit on SourceTree for more information.
- To ignore files
- Select the file you want to ignore in the "Unstaged files" window
- Right click on the file.
- Click on "Stop Tracking" in the context menu.
- Repeat the commit process, but this time add the .gitignore file to the commit that contains the name of the file you ignored.
- To discard changes
- Click on "discard changes" in the context menu of the file.
- Or you can right click on the last commit, then on the option 'Reset to this commit' -'Hard - discard all working copy changes'.