sbdtu5498 / GSoC-pgRouting

Semi-mirror repository for GSoC students work
GNU General Public License v2.0
0 stars 0 forks source link

Task 2: Experience with Github and Git #1

Open sbdtu5498 opened 2 years ago

sbdtu5498 commented 2 years ago
sbdtu5498 commented 2 years ago

Clone your fork repository in your computer

git clone https://github.com/sbdtu5498/GSoC-pgRouting.git

Cloning into 'GSoC-pgRouting'... remote: Enumerating objects: 116580, done. remote: Counting objects: 100% (16261/16261), done. remote: Compressing objects: 100% (4426/4426), done. remote: Total 116580 (delta 11465), reused 15867 (delta 11253), pack-reused 100319 Receiving objects: 100% (116580/116580), 60.58 MiB | 668.00 KiB/s, done. Resolving deltas: 100% (82997/82997), done.

Create remote named upstream pointing to https://github.com/pgRouting/GSoC-pgRouting.git

cd GSoC-pgRouting

git remote -v

origin https://github.com/sbdtu5498/GSoC-pgRouting.git (fetch) origin https://github.com/sbdtu5498/GSoC-pgRouting.git (push)

git remote add upstream https://github.com/sbdtu5498/GSoC-pgRouting.git

git remote -v

origin https://github.com/sbdtu5498/GSoC-pgRouting.git (fetch) origin https://github.com/sbdtu5498/GSoC-pgRouting.git (push) upstream https://github.com/sbdtu5498/GSoC-pgRouting.git (fetch) upstream https://github.com/sbdtu5498/GSoC-pgRouting.git (push)

Checkout to the develop branch of upstream

From https://github.com/sbdtu5498/GSoC-pgRouting

  • [new branch] ashish-2021 -> upstream/ashish-2021
  • [new branch] develop -> upstream/develop
  • [new branch] main -> upstream/main
  • [new branch] veenit-2021 -> upstream/veenit-2021
  • [new branch] vrprouting-develop -> upstream/vrprouting-develop

git checkout upstream/develop

Note: switching to 'upstream/develop'.

You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example:

git switch -c

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 409c9e8f1 [docqueries][tsp] removing randomize parameter from calls (#2234)

Create new branch with name <your-git-nick>-test

git branch

  • (HEAD detached at upstream/develop) develop main

git branch sbdtu5498-test

git branch

  • (HEAD detached at upstream/develop) develop main sbdtu5498-test

Edit doc/src/pgRouting-introduction.rst and put your name on contributor

Switched to branch 'sbdtu5498-test'

nano doc/src/pgRouting-introduction.rst

Push the newly created branch with the change

git status

On branch sbdtu5498-test Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git restore ..." to discard changes in working directory) modified: doc/src/pgRouting-introduction.rst

no changes added to commit (use "git add" and/or "git commit -a")

git commit -am "adding name to contributors list"

[sbdtu5498-test 4b60f8d6d] adding name to contributors list 1 file changed, 2 insertions(+), 1 deletion(-)

git push origin sbdtu5498-test

Username for 'https://github.com': sbdtu5498 Password for 'https://sbdtu5498@github.com': Enumerating objects: 9, done. Counting objects: 100% (9/9), done. Delta compression using up to 8 threads Compressing objects: 100% (5/5), done. Writing objects: 100% (5/5), 461 bytes | 461.00 KiB/s, done. Total 5 (delta 4), reused 0 (delta 0) remote: Resolving deltas: 100% (4/4), completed with 4 local objects. remote: remote: Create a pull request for 'sbdtu5498-test' on GitHub by visiting: remote: https://github.com/sbdtu5498/GSoC-pgRouting/pull/new/sbdtu5498-test remote: To https://github.com/sbdtu5498/GSoC-pgRouting.git

  • [new branch] sbdtu5498-test -> sbdtu5498-test