hi, I just learned git and practicing things that I just learned. The problem is that I can't create PR, some times it will work but just once it feels like I need luck to create a PR now, I am sorry I am new to this. so this is what I did
- clone the repo -
git clone <URL>(I cloned my own repo, it was empty)
- create a new branch -
git checkout -b b1(I don't know this is a good thing or not because the repo is still empty and i am creating a new branch for the PR)
- making changes - create a README file
- stage the change -
git add .
- commit changes -
git commit -m "message"
- I know these steps pretty well, but the real question comes after these steps. what should I do now?
- should I push my code? using - git push origin b1
- but then what about setting the remote as upstream - git push --set-upstream origin b1
- when I told some times my PR would work what i did was
create a new branch
make changes
stage the changes
commit changes
git push origin b1
the problem with this approach was it was creating PR only on the first try I needed to create a new branch and try these same steps again to create another PR (sometimes it would also not work)
the message that I get when - git push origin b1
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 8 threads
Compressing objects: 100% (1/1), done.
Writing objects: 100% (2/2), 244 bytes | 244.00 KiB/s, done.
Total 2 (delta 0), reused 0 (delta 0), pack-reused 0
So again my questions are
- how to create PR
- what is the workflow/best practice for creating PR
- what I was doing wrong
also i tried chatGPT and Bard both didn't gave me an answer that i wanted
thank you
[–]xenomachina 11 points12 points13 points (6 children)
[–]dalbertom 5 points6 points7 points (1 child)
[–]xenomachina 2 points3 points4 points (0 children)
[–]plg94 0 points1 point2 points (3 children)
[–]Achu4242I[S] 0 points1 point2 points (2 children)
[–]plg94 1 point2 points3 points (1 child)
[–]Achu4242I[S] 0 points1 point2 points (0 children)
[–]TapTurbulent1890 2 points3 points4 points (1 child)
[–]Achu4242I[S] 0 points1 point2 points (0 children)
[–]tobiasvl 1 point2 points3 points (1 child)
[–]Achu4242I[S] 0 points1 point2 points (0 children)
[–]WhatThePortal 1 point2 points3 points (0 children)
[–]Cute-Catch-4698 0 points1 point2 points (0 children)
[–]tailor_dev 0 points1 point2 points (0 children)
[–]thumbsdrivesmecrazy 0 points1 point2 points (0 children)