Direct naar hoofdinhoud

Git-commando's voor bijdragers

Onofficiële Beta-vertaling

Deze pagina is vertaald door PageTurner AI (beta). Niet officieel goedgekeurd door het project. Een fout gevonden? Probleem melden →

Hoewel de meesten van ons bekend zijn met versiebeheer, brengt werken met een fork en zorgen voor soepele merges extra uitdagingen met zich mee. Deze pagina helpt je met taken die gevraagd kunnen worden, maar die buiten je comfortzone liggen.

Ga achterover zitten, ontspan en neem je handdoek mee.

Als je niet vertrouwd bent met git via de CLI, raden we GitKraken aan. Het is de beste cross-platform git-tool en we hebben ook instructies toegevoegd voor het gebruik ervan.

Ik heb de conventionele commit-richtlijnen niet gevolgd

Open your oh-my-posh repo inside GitKraken and right click the commit you want to reword in the graph overview. Select Edit commit message, reword it to respect the conventional commit guidelines and press Update message.

Click Push on the top of the screen and select Force Push to bring the changes to the Pull Request.

Mijn branch is niet synchroon met de remote

Dit betekent dat de main-branch van oh-my-posh commits bevat die jouw branch mist (dit kan je main-branch zijn, of de branch waar je aan werkt). Om dit op te lossen moeten we rebasen (de nieuwe commits van oh-my-posh's main-branch onder jouw nieuwe commits plaatsen) zodat de pull request gemerged kan worden.

Het eerste wat je moet doen is de oh-my-posh-codebase als remote toevoegen aan je lokale git-repository. Standaard is je fork een zelfstandige kopie van oh-my-posh met een eigen remote op GitHub die niet verbonden is met de oh-my-posh-codebase. Forks en Pull Requests zijn een door GitHub geïntroduceerde functionaliteit bovenop git-functionaliteit, dus moeten we die situatie zelf nabootsen.

Voeg de remote toe aan je lokale git-repository

Hover over Remote on the left-hand side, this will show a + button. Click it and select GitHub. There you have the ability to select jandedobbeleer/oh-my-posh and name it upstream. GitKraken will fetch the remote and you will see all branches underneath upstream as you do for your own branches. Right click upstream's main branch and select Rebase <branch> onto upstream/main.

Click Push on the top of the screen and select Force Push to bring the changes to the Pull Request.

Rebase je branch op upstream/main

Right click upstream's main branch and select Rebase <branch> onto upstream/main. Click Push on the top of the screen and select Force Push to bring the changes to the Pull Request.