[Gambas-user] Let me ask you a question about Git and GitLab

Gianluigi bagonergi at gmail.com
Mon Mar 9 16:05:36 CET 2020


Il giorno lun 9 mar 2020 alle ore 15:24 Christof Thalhofer <
chrisml at deganius.de> ha scritto:

> Am 09.03.20 um 13:50 schrieb Gianluigi:
>
> > And after:
> >
> > $ git pull upstream master
> ...
> Ok now you should commit your changes as always and then do a
>
> $ git push
>
> Please tell me if that worked.
>

Just not to be wrong, now my status is this:
--------------------------------------------
$ LANG=C git status
On branch italian-traslations
Your branch is ahead of 'origin/italian-traslations' by 3 commits.
  (use "git push" to publish your local commits)

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

modified:   app/src/gambas3/.lang/it.po

no changes added to commit (use "git add" and/or "git commit -a")
-------------------------------------------------------------------
I just have to give git push as suggested by you and git, without repeating
add and commit first, right?


> So ... all you needed was "git pull upstream master". But normally
> better is a
>
> $ git rebase upstream master
>
> if you have commits in your workdir (which are not pushed!).
>
> If you have a problem, you always can copy the whole workdir (all except
> the hidden directory .git) to another place to make a backup. Then reset
> the workdir to an older version:
>
> $ git reset --hard $HashOfOlderVersion
>
> then
>
> $ git pull upstream master
>
> to make it similar to the original Gambas.
>
> And then copy your changes from the backup over it, then commit, then push.
>

OK, I'll treasure your advice

>
> You should learn mostly everything about these essential Git commands:
> fetch, pull, push, merge, stash, branch, rebase and reset.
>
> If you have done that you will never have any problem any more. Not with
> women, not with children, not with age or drugs. And obviously not with
> Git repositories.
>

Yours is definitely good universal advice, too bad it came to me a little
late, given my age :-)

Thank you and regads
Gianluigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200309/a69f2912/attachment.html>


More information about the User mailing list