Search what you want

Saturday, March 28, 2015

How To Join To Other Project [GITHUB]

1. Sign in to your account

2. go to project where the project located
    type ardhimaarik in seacrh box -> short by users -> choose ardhimaarik




3. choose project bot and klik and fork



4. copy-paste HTTPS clone URL 

5. go to your terminal

6. configure your email and username
$ git config --global user.name "erdearik"
$ git config --global user.email "ardhimaarik2@gmail.com"

 
7. clone bot directory to your computer
$ git clone https://github.com/ardhimaarik/bot.git

8. enter to bot directory to your terminal and check file
$ cd bot
$ ls

now, you are already connect between computer directory and your agithub acount in cloud

~~~~~~~~~~~~~~~~~~~~~~~~
########################

//set your origin and upstream
origin -> your account, branch
upstream -> master / real directory youare forked at there

$ git remote remove origin
$ git remote remove upstream
$ git remote add origin https://github.com/erdearik/bot.git
$ git remote add upstream https://github.com/ardhimaarik/bot.git



~~~~~~~~~~~~~~~~~~~~~~~~~
#########################


//make new branch
if you create new project file, you should create new branch (one projek, one branch)

1. make new branch
$ git checkout -b firstCommit

2. show all branch
$ git branch

3. switch to firstCommit branch
$ git checkout firstCommit

~~~~~~~~~~~~~~~~~~~~~~~~~
#########################



//update your git
before you push your work, fequently update your git
1. go to your root folder
erdearik@erdearik:~/bot$ 

2. check your branch 
$ git branch

3. switch to master branch
$ git chekout master

4. upstream and merge
$ git fetch upstream
$ git merge --no-ff upsream/master



~~~~~~~~~~~~~~~~~~~~~~~~~
#########################


So, how to commit and push work project

1. make file that you want to push
$ nano

type your data and save




2. check your directory
$ ls
3. commit to your cloud directory
$ git add testFile
$ git commit -m "test first commit"

4. push to cloud
$ git push origin firstCommit



~~~~~~~~~~~~~~~~~~~~~~~~~
#########################
//How to pull 
each you push your work to your account, you must to pull to master file, in this case, have to pull to ardhimaarik/bot.
1. open your browser
2. go to your project which you latest push
3. click compare and pull request and leave the message



 4. wait until your request is confirm

No comments:

Post a Comment