Giter Site home page Giter Site logo

Github / Rebase about docdev HOT 4 CLOSED

glpi-project avatar glpi-project commented on September 18, 2024
Github / Rebase

from docdev.

Comments (4)

trasher avatar trasher commented on September 18, 2024

Hello,

I've already wrote a line about the workflow; see http://glpi-developer-documentation.readthedocs.io/en/master/sourcecode.html#general

While this is not explicit (I'll add a note), the advice is to keep master (and bugfixes) branch on upstream repository; no need to update your fork that way.

from docdev.

AnaelMobilia avatar AnaelMobilia commented on September 18, 2024

Hi @trasher ,

Thanks for the update.
My - stub - question is how did i keep the master on my fork synchronized with the master of the glpi repository (same for the 9.1 bugfixes, ...)

I fork one time the glpi repository, then I create a first branch to work on it and PR.
Some days later, I create a second branch for another thing and want this branch to be up-to-date of the glpi/master at the time I create the branch.

I duno how to do this technicaly ;-)

Bests regards,
Anael

from docdev.

trasher avatar trasher commented on September 18, 2024

Well... creating a branch for me is done locally with a git branch -b mybranch while on the branch I want to work from. Fact is my master branch is always glpi one, not my fork's; so updating myfork/master branch is only done sometimes (mainly to keep uploading my work branches light).

On our local copy, considering your "origin" points to your fork, you can do:

$ git co anybranch
$ git branch -d master
$ git remote add upstream https://github.com/glpi-project/glpi.git
$ git fetch upstream
$ git co -b master upstream/master

Master branch will always be the good one, you'll just have to git pull on it. Then, if you want to update you fork's master branch; just run (while you're on master locally):

$ git push origin master

If you do not work on master directly (I advice you not to do); it will just be ok. If you've already changed you fork's master; you can drop it before runnign again the last push command.

Hope that helps you :)

from docdev.

AnaelMobilia avatar AnaelMobilia commented on September 18, 2024

Hello,

Not as easy : my IDE (Netbeans) try on this configuration to commit to the glpi repository and not mine...

The solution I found :

[pack]
	buildbitmaps = false
[core]
	symlinks = false
	repositoryformatversion = 0
	filemode = false
	logallrefupdates = true
	bare = false
[remote "origin"]
	url = https://github.com/AnaelMobilia/glpi.git
#	url = https://github.com/glpi-project/glpi.git
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
	remote = origin
	merge = refs/heads/master

I pushed the master branch to my repository to create a link between Netbeans & github.

When i want to update the fork master :

  • switch to master branch
  • switch the url to glpi-project repository
  • fetch content
  • switch back to my repository
  • push content

Thanks for the help !
Regards

from docdev.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.