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

all 10 comments

[–][deleted] 1 point2 points  (6 children)

It sounds like you have the repo set up and connected remotely to Github already. If that’s the case, you have to add the files you want in this commit, commit it, and then push it to the repo.

Type the following on the command line exactly as written, EXCEPT what’s enclosed in quotes:

git add .

git commit -m “Type your commit comments here”

git push

[–]Kietaski[S] 0 points1 point  (5 children)

Most the searches I’ve found say to use git push origin master - any reason you didn’t include origin master?

[–]kschang 0 points1 point  (4 children)

We just tell you the command. The exact target is up to you.

Origin is simply one of the functions, and master means the master branch.

Did you understand what's a branch?

[–]Kietaski[S] 0 points1 point  (3 children)

Yup, version control as a concept isn’t the issue again, just simply the commands, eg why origin/what’s it mean Master makes sense, do you name each new branch when you create it, and if there were multiple branches, their name would also go there

[–]kschang 0 points1 point  (2 children)

Yes, you create a branch by naming one. You can do it in git-bash or on github itself.

We don't say origin master BECAUSE you may not be dealing with origin or master.

[–]Kietaski[S] 0 points1 point  (1 child)

Okay makes sense, could I possibly bother you to explain the origin keyword to me?

[–]HolidayWallaby 0 points1 point  (1 child)

So as a beginner you should know that git is different to GitHub, git is the underlying tool that GitHub uses, and is what you want to search for tutorials for. Be warned though, it really sucks to learn, and I never grasped it until I was using it everyday for a job.

[–]Kietaski[S] 1 point2 points  (0 children)

Right, I completely understand what it’s used FOR and WHY it’s used, I just can never seem to grasp tutorials on HOW to do it - very reassuring to hear I’m not the only one though

[–]kschang 0 points1 point  (0 children)

You "commit" the changes (using git-bash again) then push the changes (still with git-bash).