What's new

Closed Front-end development series 09 | basics in git — local repository to remote (github)

Status
Not open for further replies.

_iamkurt

Honorary Poster
Joined
Aug 13, 2017
Posts
463
Reaction
308
Points
224
In this thread, dapat meron na kayong local repository sa local machine mo. If wala pa check mo You do not have permission to view the full content of this post. Log in or register now.. Ngayon, let us upload our local repo to remote repo, in this example, let us use GitHub.

If na miss nyo previous thread, see below:
Front-end development series
Front-end development series | setup VM for centos 7
Front-end development series | install centos 7 in VM
Front-end development series 04 | connect centos 7 on the internet
Front-end development series 05 | install ssh in centos 7
Front-end development series 06 | install httpd
Front-end development series 07 | install nodejs, yarn, gulp, and git
Front-end development series 08 | basics in git

At this point, you should have these files below, where we left on our previous thread.
Code:
[root@localhost PHCorner]# ls -lah
total 4.0K
drwxr-xr-x  3 root root  35 Nov  3 00:44 .
drwxr-xr-x. 5 root root  70 Nov  3 00:36 ..
drwxr-xr-x  8 root root 193 Nov  3 01:43 .git
-rw-r--r--  1 root root  64 Nov  3 01:14 README.md
[root@localhost PHCorner]#

— If all set, let's get started. Sign up in Github page, see You do not have permission to view the full content of this post. Log in or register now.. Follow mo lang yung prompts, registration should be straightforward. :)


— Click on New Repository
lnstGK.png


— complete both Repository Name and Description. The rest, leave mo lang as defaults, then click Create Repository.
thwrXM.png


You should have the same page below:
BC48D3.png


Important git command is shown below:
Code:
git remote add origin https://github.com/username/PHCorner.git
git push -u origin master


Try natin breakdown yung command.

git remote add origin — dito natin i point yung local repo natin sa local machine to remote repo
git push — ito yung upload command sa git, from local repo to remote repo

Magaling — new Git achievement unlock :):):)

Let us go back to our local machine and get those Git commands started. Copy and paste mo lang, safe yan for sure.

Code:
[root@localhost PHCorner]# git remote add origin https://github.com/username/PHCorner.git

Code:
[root@localhost PHCorner]# git push -u origin master

From here, you should be prompted on your Git credentials as shown below:
aNmR8L.png

Success! :):):)
Visit mo ulet yung Github repository mo, you should have the same copy from your local repo, for example:
iX97bL.png

Next thread, let us work with Yarn and Gulp. I hope excited din kayo. If you wish to add details on this thread, let me know, this way I could update my work in no time.

See you in next thread ka-PHC. :)
 

Attachments

Last edited by a moderator:
Status
Not open for further replies.
Back
Top