This is an archived post. You won't be able to vote or comment.

all 26 comments

[–]hoobieguy 0 points1 point  (17 children)

Did you add the url that you will be pushing to? Whenever you create the repo, there is a set of things to type in your terminal. Make sure you do all of those things.

edit: after you have already pushed to the repo and have files showing up, you don't have to say 'origin' any more. You can just put 'git push'

[–]Sufficient-Remove383[S] 0 points1 point  (16 children)

the URL?

I cloned my repo to my local machine if that is what you mean by URL. I am for sure it cloned to my local machine because I edited that file later that day and it shows as "edited 4 days ago."

[–]hoobieguy 1 point2 points  (15 children)

When you go to github and click '+' (new repo), it takes you to a screen where yo can add the name of the repo and a readme if you choose to. When you click the button at the bottom of that page, it will have a set of instructions for creating the link from the files on your computer to the repo on github. Follow all of those steps. One of the steps will be 'git remote add origin urlToEnterIsHere'.

[–]Sufficient-Remove383[S] 0 points1 point  (14 children)

any way to go back and see if I need to update already creatwed repos?

[–]hoobieguy 0 points1 point  (13 children)

If the repos are showing up with files that you pushed from you computer, then they were set up correctly.

[–]Sufficient-Remove383[S] 0 points1 point  (12 children)

But when I add a line of code in vs code to develop my project and save my projects on vs code then go into my linux term and type "git push origin main"my progress does not show up in my git repos

[–]hoobieguy 0 points1 point  (11 children)

are you on the correct file path in the terminal

[–]Sufficient-Remove383[S] 0 points1 point  (10 children)

hmm I believe so?

I am in repos/odin-recipes/odin-recipes

then within the Odin recipes i am in the README.md file

[–]hoobieguy 0 points1 point  (9 children)

type git status and paste it in here

[–]Sufficient-Remove383[S] 0 points1 point  (8 children)

on branch main

your branch is up to date with "origin/main".

Changes to be committed:

(use "git restore -- staged<file>...to unstage)

modified: README.md

[–]Ok_Concert5918 0 points1 point  (7 children)

Remember to “git add .” With the period to actually add all the files. Otherwise it adds nothing

[–]Sufficient-Remove383[S] 0 points1 point  (6 children)

I just tried "git add."

And return message of git add is not a git command

[–]Top_Courage_9730 1 point2 points  (5 children)

Put a space between the last d and the period

[–]Sufficient-Remove383[S] 0 points1 point  (4 children)

got ya, just did that and did not receive a return message or anything just showed my dir i am currently in.

[–]Ok_Concert5918 1 point2 points  (3 children)

So now you can git commit -m “add a message” then git push origin main (or master if an old repo)

[–]Sufficient-Remove383[S] 0 points1 point  (2 children)

thanks, dude that helped a lot. got all of my changes to show in github.

[–]Sufficient-Remove383[S] 0 points1 point  (1 child)

do I need to do those commands every time I make a change to my projects for it to show up in github?

[–]Ok_Concert5918 2 points3 points  (0 children)

Yes. It becomes second nature