banner



How To Upload Source Code To Github

Here I explain how I did information technology on Window, mayhap it also helps others :)

Make sure to install Git and GitHub.

After installation is complete, open "git bash";

enter image description here

so a window like below is gonna popular upwardly:

enter image description here

Go ahead and blazon cd ~ to make certain yous are on home directory;

Yous can check the address that you are in information technology by typing pwd;

Now yous need to create a GitHub account;

After creating a GitHub account, go alee and sign in;

Later yous signed in, on the top correct click on the + and choose "New Repository"

enter image description here

So in the opened window, type the name that you wish to have for the repository in the "Repository name" box. Add "Description (optional)" if you like, and marker "Initialize this repository with a README". Then click on "Create repository".

enter image description here

Now go to your C driver; create a new binder and name it "git" At present get to the "git bash" window; change the directory to c drive by typing cd ~; cd /c If y'all type ls at that place it would evidence yous the folders in that location; Brand sure information technology shows the git folder there:

enter image description here

Now go back to the browser; go to your GitHub page, click on the repository that yous fabricated; and click on "Clone or download"; and copy the accost that shows there (past choosing re-create to clipboard)

enter image description here

At present going back to "git bash"; Use the command cd git to go to the git folder; now write the following commands to connect to your GitHub (enter the username and password of your GitHub when it asks you)

          git config --global user.name "Your Name"                  

And then: git config --global user.email youremail@domain.com . Adjacent type: git clone (url), instead of the (url), type the address of the GitHub repository that you lot copied from your GitHub page; (e.1000. git clone https://github.com/isalirezag/Test.git).

Now if you practice ls command you will see your repository there; If yous as well open the git folder that you have in your window y'all volition see that your repository is added as a binder.

Now utilize the cd command to go to the repository: cd Test

Go alee and copy and paste any files that you desire to put in this repository in that folder.

In guild to transfer the files to your repository you need to do following now:

Blazon git

add filename (filename is the file proper noun that you want to upload) or you tin type the command beneath if you want to add all the files in the folder:

git add .

And then blazon: git commit -yard "adding files" . So: git push -u origin master .

And then you should be all set, if you lot refresh your GitHub account the files should be at that place :)

Source: https://stackoverflow.com/questions/12799719/how-to-upload-a-project-to-github

Posted by: raythertualong.blogspot.com

0 Response to "How To Upload Source Code To Github"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel