Getting Started: Local vs Remote Folders


#1

I’m a newbie in web development and I followed the steps to get the site running in local with a theme I selected. When I try uploading the site folder to Github, I see that not all folders are actually uploaded and the site doesn’t work as expected (like it does in local). I’m not sure what am I missing and I tried going thru the documents for no avail. May be I’m overlooking something or not looking in the right place or could be something else. I’m really hoping to get some help here in getting me started with my first website.

Thanks in Advance


#2

How did you go about ‘uploading to Github’? Can you tell us what commands you ran? Can you link to your repository?


#3

Thanks for the response. I followed the tutorial on Hugo.

After creating a new site.

I did:

CD folder name

git init

and then installed the theme I used Hugo-fresh

Then uploaded to the remote repository by following the tutorial again

On terminal the status is all good but on the git repo it’s not the same - as in some folders are missing.

GitHub.com/vikramhimanshu/himanshu-page is the repo we’ Talking about


#4

Thanks for that. What you need to do is add the rest of your files to your git repository. There are instructions for the command line here.

However, I find it much easier to use a GUI like sourcetree or the git features built into the atom text editor (your favourite editor may well have git features built-in).


#6

I tried doing it manually and also tried using Tower Git to do it and it still won’t work. The main folder is Git enabled but the folders within are not in git (they don’t even show up as untracked). When I tried adding them manually Using Git add command it still won’t work. I don’t get an error but nothing happens.


#7

Start over. Start a test site, to test uploading a functioning site to GitHub. Once you’ve gone through it a couple of times you’ll begin to understand what each step is doing. And you need to learn git and GitHub on your own, we can’t help with those. :slight_smile:


#8

Thanks. Figured that the empty directories were not being added so added them by adding a .gitignore file in each one of them. After which the structure on my local now matches the remote. Nevertheless, the local works fine but the remote is still not working.


Link to the site


#9

Ok - git doesn’t track empty directories - that’s the design. You can see this by looking at your resources directory. On github, all the empty directories under resources are greyed out until you get down to the sass directory.

So now it’s time for the next problem. What do you mean that ‘remote isn’t working’? Where are you trying to host your site? Based on the baseURL setting in your config file, my guess is you want to host on github pages. Have you followed the instructions for doing this?