Why can't I see "remote add origin https://"... code to copy on the "code" section of my repository? #163606
Replies: 4 comments
-
|
Go to your GitHub repo page cd path/to/your/project git init git remote add origin https://github.com/username/repo.git git add . if it is not the problem you are having ... and already have a repo and having some other errors ... please copy the error displayed in the terminal and reply to this comment |
Beta Was this translation helpful? Give feedback.
-
|
📁 Method 1: Using GitHub Desktop (Perfect for Beginners) Step 1: Clone Your Repository (If You Haven’t Already) Click on File > Clone Repository Choose your repository from the list Pick a local folder to save the files Step 2: Replace or Edit Your HTML File Copy your updated HTML file (e.g., index.html) into this folder Replace the old one if needed Step 3: Commit Your Changes You’ll see your changed file under the Changes tab Add a summary like: Updated index.html Click Commit to main (or the branch name you’re working on) Step 4: Push to GitHub Wait a few seconds... and done! 🔗 Now go to your GitHub repository in the browser — your HTML file should be updated! 💻 Method 2: Using Git and the Command Line (For Future-Proofing) Step 1: Open Terminal or Command Prompt cd path/to/your/folder git status git add index.html git commit -m "Updated HTML file" git push origin main |
Beta Was this translation helpful? Give feedback.
-
|
Hi @robertsonamy93, Thanks so much for reaching out in our Community. Now, when you say "relink" your file, do you mean that you've made changes to the file outside of GitHub and you would like to now upload that file into GitHub? |
Beta Was this translation helpful? Give feedback.
-
|
It's likely you don't see the git remote add origin command because your GitHub repository isn't completely empty (e.g., it has a README). Here's a concise guide to push your HTML file:
If you already set it up: You can skip this or update with git remote set-url origin YOUR_REPOSITORY_URL. Stage Changes: git add . Commit Changes: git commit -m "Updated HTML file" Push to GitHub: git push -u origin main (or master, check your repo's default branch). You might need to authenticate with a Personal Access Token (PAT) instead of your password. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi - I'm brand new, really struggling to figure out even the basic stuff. I have updated an HTML file I've been working on and wanted to re-link it to GitHub. I'm having a real hard time understanding how to do this. I have watched a number of youtube videos and can't seem to get it to work.
Beta Was this translation helpful? Give feedback.
All reactions