Make changes to a file

We’ve created our TODO.txt file and committed it.

Let’s go ahead and add some content to it.

Let’s now add a to do list to our TODO.txt file

Edit TODO.txt

To start editing our TODO.txt, right click on it in the right hand panel and click on

title picture

This opens up the file again, ready for editing.

Add the following to do list:

- Create first repository (done)
- Add a file to the repo (done)
- Modify file locally with to do list (done)
- Modify to do list on GitHub
 

This is what it looks like in GitKraken Client. Make sure you include an empty line at the end of the file. Also note the blue dot indicates unsaved changes to the file.

title picture

Next we need to save the changes to our file in the same way you would save any file on your system, with | Ctrl + S.

Git again detects the changes to the file and lists it in the Unstaged Files. This time however, it’s preceded by an orange pencil icon. That’s because TODO.txt is not a new file. Instead, it is a file that git is already tracking but has now been modified.

title picture

Let’s go ahead and stage our file and go through the process of commiting the changes


Commit changes to TODO.txt

Next let’s follow the same steps we did previously to commit our changes and synch our remote repository.

  • Stage the TODO.txt file.
  • Write an informative commit message.
  • Make the commit.
title picture
  • Review our commit history.
  • Push the changes to our remote repository.
title picture