Git Help

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,360
Reaction score
420
Points
83
Website
users.kymp.net
Some help with the Git needed. I started working on atmospheric rendering overhaul on D3D9client and I would like to "push" my current work in progress to a new branch.
The current branch is "orbitersim/d3d9client" that's where the changes go if I commit and push. But I would like to commit them to "jarmonik/orbiter/atmo-remake" instead and then make a pull-request later-on when the work is finished. No local/remote branch created yet. I have been writing code two months without touching the Git and I have forgotten most of it.

I tried with bad results:
-stash
-create/checkout new branch
-stash pop

So, I restored my "clean" backup copy of the work.
 

n72.75

Addon Developer
Addon Developer
Tutorial Publisher
Donator
Joined
Mar 21, 2008
Messages
2,198
Reaction score
691
Points
128
Location
Biddeford ME
Website
mwhume.space
Preferred Pronouns
he/him
Step 1. fork the repo.
Step 2. clone it locally to your computer, and checkout d3d9client (git checkout d3d9client)
Step 3. create a new branch

If you're using the visual studio git plugin you can create a new local branch like this.
1636729041343.png

you can also do this via command line with
git checkout -b atmo-remake

Step 4. make new commits to this branch. when you push them, either with VS, or "git push" a tracked branch will be added on GitHub
Step 5. when it's all done. you can make a pull request to orbitersim/d3d9client
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,311
Reaction score
454
Points
123
Location
Vienna
A branch in Git is just a pointer to a commit. Thus you can always create a new branch where ever you are. On the command-line, command to create a new branch at the checkout you are at, is "git checkout -b jarmonik/orbiter/atmo-remake".
 

n72.75

Addon Developer
Addon Developer
Tutorial Publisher
Donator
Joined
Mar 21, 2008
Messages
2,198
Reaction score
691
Points
128
Location
Biddeford ME
Website
mwhume.space
Preferred Pronouns
he/him
Stash is not something I use much. Doesn't work well with my workflow.

Here's a video on it though.
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,360
Reaction score
420
Points
83
Website
users.kymp.net
A branch in Git is just a pointer to a commit. Thus you can always create a new branch where ever you are. On the command-line, command to create a new branch at the checkout you are at, is "git checkout -b jarmonik/orbiter/atmo-remake".

Thanks, that did exactly what I needed. It was that easy after all.
 
Top