Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task 2: Experience with Github and Git #2

Open
11 tasks done
aryan1010 opened this issue Jan 25, 2023 · 1 comment
Open
11 tasks done

Task 2: Experience with Github and Git #2

aryan1010 opened this issue Jan 25, 2023 · 1 comment

Comments

@aryan1010
Copy link
Owner

@aryan1010
Copy link
Owner Author

aryan1010 commented Jan 25, 2023

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

  • [new branch] develop -> upstream/develop
  • [new branch] main -> upstream/main
  • [new branch] manas-2022 -> upstream/manas-2022
  • [new branch] manas-prepare-pr -> upstream/manas-prepare-pr
  • [new branch] nitish-2022 -> upstream/nitish-2022
  • [new branch] nitish-prepare-pr -> upstream/nitish-prepare-pr
  • [new branch] sanskar-2022 -> upstream/sanskar-2022
  • [new branch] shobhit-2022 -> upstream/shobhit-2022
  • [new branch] shobhit-prepare-pr -> upstream/shobhit-prepare-pr
  • [new branch] vrprouting-develop -> upstream/vrprouting-develop

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 d2a4ab3 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 d5e814a] 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant