[SOLVED] GIT

Everything that has to do with the forum on a technical level. Logins, posts, formatting ...
Octal450
Posts: 2184
Joined: Sun Oct 18, 2015 2:47 am

Re: [SOLVED] GIT

Postby Octal450 » Thu Jan 07, 2016 2:43 pm

No problem, you are the same SHM from mumble right?

Hi, I'm ATC411.

User avatar
SHM
Posts: 1960
Joined: Mon Sep 14, 2015 3:32 pm
Location: India

Re: [SOLVED] GIT

Postby SHM » Thu Jan 07, 2016 3:16 pm

Yes that is me. Yeah I knew you were 411 :D

SHM
FG Pilot (2011-2018)
Prepar3d (2015 - 2023)
MSFS2020 (2020 - )
Image

Octal450
Posts: 2184
Joined: Sun Oct 18, 2015 2:47 am

Re: [SOLVED] GIT

Postby Octal450 » Thu Jan 07, 2016 5:08 pm

Roger that SHM. :)

User avatar
SHM
Posts: 1960
Joined: Mon Sep 14, 2015 3:32 pm
Location: India

Re: [SOLVED] GIT

Postby SHM » Tue Apr 12, 2016 1:12 pm

Hi there,
Could someone tell me how I can make changes to a branch I've created?

SHM
FG Pilot (2011-2018)
Prepar3d (2015 - 2023)
MSFS2020 (2020 - )
Image

sanhozay
Posts: 167
Joined: Fri Sep 25, 2015 5:59 pm

Re: [SOLVED] GIT

Postby sanhozay » Tue Apr 12, 2016 1:35 pm

You mean how to change the files in the branch?

If so, you just checkout the branch and edit the files using a text editor.

Code: Select all

git checkout <your branch>


One you are happy, add them to the staging area:

Code: Select all

git add <list of files or directories where you have made changes>


And commit, with a useful commit message (something significantly better than "fixed a bug"):

Code: Select all

git commit


For a tutorial, see here: https://www.atlassian.com/git/tutorials/saving-changes

User avatar
SHM
Posts: 1960
Joined: Mon Sep 14, 2015 3:32 pm
Location: India

Re: [SOLVED] GIT

Postby SHM » Tue Apr 12, 2016 1:58 pm

I'm trying to push another variant of RJAA and I need to completely change the objects folder.

I'll try it out.

Thanks
SHM
FG Pilot (2011-2018)
Prepar3d (2015 - 2023)
MSFS2020 (2020 - )
Image

sanhozay
Posts: 167
Joined: Fri Sep 25, 2015 5:59 pm

Re: [SOLVED] GIT

Postby sanhozay » Tue Apr 12, 2016 4:31 pm

Pushing to a remote repository is a slightly different matter, but all covered in the excellent Atlassian tutorial.

https://www.atlassian.com/git/tutorials ... g/git-push

I usually keep a dedicated upstream branch locally to push from, doing work in a separate branch. Then when I am happy, I merge the changes from the work branch into the upstream branch and push. Then I can always see what's on the remote repo by checking out the upstream branch.

Code: Select all

git checkout work
# do something interesting
git add .
git commit
git checkout upstream
git merge work # merge the changes I did in work
git push upstream # push it to the remote

But if I completely mess up the work branch, or just don't like it, I can just delete it and recreate it, e.g.

Code: Select all

git checkout upstream # check out my local copy of what is upstream
git branch -D work # delete the branch I didn't like
git checkout -b work # make a new work branch, copied from the upstream

User avatar
SHM
Posts: 1960
Joined: Mon Sep 14, 2015 3:32 pm
Location: India

Re: [SOLVED] GIT

Postby SHM » Tue Apr 12, 2016 4:38 pm

Thanks so much for your help. It worked. :D

SHM
FG Pilot (2011-2018)
Prepar3d (2015 - 2023)
MSFS2020 (2020 - )
Image


Return to “Technical Questions”

Who is online

Users browsing this forum: No registered users and 2 guests