git learning experience git cross-branch commit code

Recently, I encountered the problem of git submitting code across branches at work. The code of the remote master branch is pulled locally, and the local modified code needs to be submitted to the remote temp branch.

1. Fork the local branch of the corresponding project on gitlab

2. Update the local code and merge the remote temp branch code to the local master branch (the development tool I use here is netbeans)

 

 

 

 Click Finish. If there is a conflict, you can click View to back up the local modified code, and then restore the local corresponding conflict file to resolve the conflict. After the update is completed, the backup modified code will be updated in the updated code. Submit the changes.

3. Submit local code

Select the corresponding file to submit

4. Push the local code to the master branch of the remote fork project

 

 5. Merge the remote fork project master branch code to the remote project temp branch

 

 

This is my first time using git, so please correct me if I am wrong.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324691573&siteId=291194637