# Sync Hugo project with Github Repository

**URL:** <https://discourse.gohugo.io/t/sync-hugo-project-with-github-repository/21085>\
**Category:** support\
**Created:** [October 3, 2019, 11:13am UTC](https://discourse.gohugo.io/t/sync-hugo-project-with-github-repository/21085 "2019-10-03T11:13:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fount-via](https://avatars.discourse-cdn.com/v4/letter/f/6f9a4e/32.png) [@fount-via](https://discourse.gohugo.io/u/fount-via)\
**Post date:** [October 3, 2019, 11:13am UTC](https://discourse.gohugo.io/t/sync-hugo-project-with-github-repository/21085/1 "2019-10-03T11:13:11Z")

</div>

I would love to be able to sync my project files with a new Github account/repository I have setup.  
I’m using Atom but have drawn a blank with their integration.  
Git is installed via \> brew install git  
My intention is to not host the pages with Github, just the project files.  
I’m sorry I can’t follow the instructions given here: [https://gohugo.io/hosting-and-deployment/hosting-on-github/](https://gohugo.io/hosting-and-deployment/hosting-on-github/)

---

<div class="post-metadata">

**Author:** ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Post date:** [October 3, 2019, 11:31am UTC](https://discourse.gohugo.io/t/sync-hugo-project-with-github-repository/21085/2 "2019-10-03T11:31:25Z")

</div>

- First you need to create a repo on GitHub.
- Then you copy its `https` address (this is simpler than SSH)

Since you seem to be on macOS

- First open the Terminal app and leave it open
- Then navigate to the folder containing the directory of your Hugo project.
- Drag the folder of the Hugo project to the Terminal icon on the dock so that a new Terminal window opens with the PATH to your Hugo project.

In the new Terminal window do the following:

- Execute `git init` to initialize git.
- Then run `git remote add <paste the https URL you copied earlier from GitHub>`

Now you have setup the GitHub repo as the remote origin of your local Hugo project.  
To create the initial commit type:

- `git add .`
- `git commit -m "Initial commit" && git push -u origin master`

That’s pretty much how one would initialize git in a Hugo project.  
There are plenty of tutorials about git on the web.

If you feel that the terminal is too much work then try one of the various Git clients like Sourcetree etc.

My favorite git client is [Fork](https://fork.dev/)

---

<div class="post-metadata">

**Author:** ![fount-via](https://avatars.discourse-cdn.com/v4/letter/f/6f9a4e/32.png) [@fount-via](https://discourse.gohugo.io/u/fount-via)\
**Post date:** [October 4, 2019, 10:47am UTC](https://discourse.gohugo.io/t/sync-hugo-project-with-github-repository/21085/3 "2019-10-04T10:47:46Z")

</div>

Wonderful! Thanks so much for your help. The initial commit process prompts for a username and password in Terminal but otherwise these instructions are complete. Thanks again.
