-4

I cannot find the walkthrough I used to check when pushing a new project with git command. I remember logging on to GitHub.com, creating a project. Then do git init, git -add something.. THen i cannot remember the rest of the operations. Can someone give me the list or if the page with the walkthrough URL still exists perhaps send me the link?

Searching on GitHub.com and Git-Scm.com

git init git add *

I expected a new GitHub repo with all files in a folder pushed up to it. The manual is complicated.

xCf
  • 3
  • 1

3 Answers3

0

after you did git add *. You need to do a commit.

git commit -m "Initial commit"

This command registers your change in your local git (created with git init)

Now you need to add a remote to tell git which distant repo it should publish the changes on. You do that with :

git remote add origin https://github.com/username/repo_name.git

You can get the url from your github it's the same you use to clone a repo.

Finally you have to do push the changes and new files with :

git push --set-upstream origin master

Reda Drissi
  • 1,532
  • 3
  • 20
  • 32
0

How to create a new project on Github

You need to create a new remote repository. It is done from GitHub's interface. Follow the link to see a detailed guide.

then push the project from my computer

Once you have created a remote repository, there are two options. Option one - you want to clone a newly created empty repository and start your work locally. Option two - you have a project and you want to link it to GitHub's remote repository.

If you do not have a project, you have to clone the repository you've just created, follow this link to know the routine.

If you do have a project and you want to link your project to a newly created repository, you need to specify a remote repository for your project. Here is the guide how to do it.

Yevgen
  • 1,576
  • 1
  • 15
  • 17
0

Ok. So the step would be. 1. Create a repository name test 2. do a git init 3. Do a git -add * 4. do a git remote add origin https://www.github.com/myuser/test.git 5. commit the changes commit -m "initial commit" 6. push the changes push origin master That's basically it?

xCf
  • 3
  • 1