aryan1010 / 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 #2

Open aryan1010 opened 1 year ago

aryan1010 commented 1 year ago
aryan1010 commented 1 year ago

Clone your fork repository in your computer git clone https://github.com/aryan1010/GSoC-pgRouting.git

Cloning into 'GSoC-pgRouting'... remote: Enumerating objects: 126343, done. remote: Counting objects: 100% (326/326), done. remote: Compressing objects: 100% (145/145), done. remote: Total 126343 (delta 176), reused 264 (delta 171), pack-reused 126017 Receiving objects: 100% (126343/126343), 67.37 MiB | 1.70 MiB/s, done. Resolving deltas: 100% (91595/91595), done.

Change into current workingdirectory cd GSoC-pgRouting

Check existing remotes git remote -v

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

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

Check existing remotes git remote -v origin https://github.com/aryan1010/GSoC-pgRouting.git (fetch) origin https://github.com/aryan1010/GSoC-pgRouting.git (push) upstream https://github.com/pgRouting/GSoC-pgRouting.git (fetch) upstream https://github.com/pgRouting/GSoC-pgRouting.git (push)

Fetching Upstream Branches git fetch upstream From https://github.com/pgRouting/GSoC-pgRouting

checkout to the develop branch of upstream 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 d2a4ab3cd Trsp enhancement (#2354)

Branch check git branch

  • (HEAD detached at upstream/develop) main

create new branch with name <your-git-nick>-test git checkout -b aryan-test

Switched to a new branch 'aryan-test'

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

git status

On branch aryan-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 add . git status

On branch aryan-test Changes to be committed: (use "git restore --staged ..." to unstage) modified: doc/src/pgRouting-introduction.rst

git commit -m "task 2:adding name in contributor list"

[aryan-test d5e814a1f] task 2:adding name in contributor list 1 file changed, 1 insertion(+)

push the newly created branch with the change git push origin aryan-test

Username for 'https://github.com': aryan1010 Password for 'https://aryan1010@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), 450 bytes | 450.00 KiB/s, done. Total 5 (delta 4), reused 0 (delta 0), pack-reused 0 remote: Resolving deltas: 100% (4/4), completed with 4 local objects. remote: remote: Create a pull request for 'aryan-test' on GitHub by visiting: remote: https://github.com/aryan1010/GSoC-pgRouting/pull/new/aryan-test remote: To https://github.com/aryan1010/GSoC-pgRouting.git

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