By now, you’ve created a GitHub repository, and you’ve edited files in your repo using GitHub’s web editor.
That works fine for small projects, but as you start working with more files, you’ll likely want to work with them on your own computer.
GitHub Desktop is an application that lets you store your files in GitHub and work with them locally, without needing to know anything about Git or the command line.
Download GitHub Desktop from the GitHub Desktop page. Install it, open it, and login with your GitHub username and password.
Back in GitHub’s webpage, navigate to your GitHub profile README repository’s homepage.
Clone your repo by clicking the Code button and then the Open with GitHub Desktop option. That should automatically open GitHub Desktop, and then click the Clone button to download your repo to your computer.
This downloads a copy of your repo onto your computer, so you can work with them locally.
Now that your README.md
file is on your computer, you can use your favorite text editor to modify it.
You can edit your README.md
file using any text editor. You can use whatever text editor came with your computer, like Notepad on Windows or TextEdit on Mac.
If you want additional features, you can download a text editor like Atom or Notepad++. But make sure you are not using a word processor like Microsoft Word, because it’ll try to add its own formatting to your text.
Don’t stress out too much about finding the exactly correct text editor. Use whatever came with your computer for now, and you can always try a few text editors out and see which one you like the best later.
Open your README.md
file in your text editor, change its contents, and then save the file.
Save your README.md
file, and then open GitHub Desktop. You should see your changes, like this:
To upload your changes, you need to do three things:
README.md
file.Commit to main
button.Push origin
button in the upper-right corner.Now you should see your changes in GitHub, both in your repo and on your profile!
Congratulations, now you know how to clone a repo, make changes to the files in that repo, and then upload those changes back to the repo!
Right now, it might not be obvious what the benefit of GitHub Desktop is over the web editor. But as your projects become more complex, being able to edit your files locally and see your changes immediately is very handy!
Next, you can start creating your own webpages using GitHub Pages!
I posted a new article about GitHub Desktop, which lets you interact with your GitHub repo on your own computer.
Check it out here:
Work with GitHub files on your computer.
Happy Coding is a community of folks just like you learning about coding.
Do you have a comment or question? Post it here!
Comments are powered by the Happy Coding forum. This page has a corresponding forum post, and replies to that post show up as comments here. Click the button above to go to the forum to post a comment!