Is my git workflow correct and in accordance with my team?

I help the guys with the project, and I have not used Git before, so I am rusty and I want everything to be correct.

Background

There is no branching. I was advised to make a direct repo clone, and then deploy.

origin/master contains release-ready code for the current version

origin/develop contains code for the latest development changes for the next version

My git draft workflow

  • Cloning a repo on my local computer:

    $ git clone <origin-url>

  • Create a new branch:

    $ git checkout -b newFeature develop

  • Makes changes, puts and commits them:

    $ git add .
    $ git commit -m "<message>"
    
  • Push changes for the remote newFeature branch (this branch does not exist in the source repo yet):

    $ git push origin newFeature
    
  • Submit a transfer request to merge origin/newFeaturein origin/develop.

  • Delete the local branch after accepting the migration request:

    $ git branch -d newFeature

Questions

  • , , develop origin/develop, newFeature? , ?

  • ? origin/develop ?

  • Git , , ? ?

  • develop, , 2? , ?

    $ git checkout -b newFeature

+4
1

, , /, newFeature? , ?

. :

git checkout develop
git pull origin develop
git checkout newFeature
git rebase develop

, newFeature, . - , rebase , ( , , ) merge develop newFeature.

? origin/develop ?

. git , , , , . , , , ( , , ). .

Git , , ? ?

, . , (.. ), , " ". , "/", .

, - "" newFeature, , . , , , "" , "-force" , . , .

, 2? , ? git checkout -b newFeature

, , . master. , develop, git checkout develop .

+2
source

Source: https://habr.com/ru/post/1671363/


All Articles