Silver Library

[Git] From scratch to merge request 본문

Personal DB/Unclassified record

[Git] From scratch to merge request

Silver Archmage 2022. 8. 16. 11:28

1. Be sure to checkout the branch you want to commit and push. And input git status is recommended based on my standard. So you can see what thing to be happened once you make push command to the branch.

 

2. Suppose your branch is 'alpha'. Then

git checkout <your branch>

e.g. git checkout alpha

 

How do you switch between branches in Visual Studio Code with Git?

I am trying to workout how branching works in Visual Studio Code and Git. Previously I've worked with TFS which was pretty simple - you create a branch and this is all stored in a separate folder o...

stackoverflow.com

3. git add .

If you want to only add specific files, try git add [specific file name]

e.g. git add Alpha (if it does not work, put format of its file as well)

 

How do I commit only some files?

I have two projects. One is the "official" project and the second is a light modification (some files added). I created new branch and I put new files to them. But in during development some files ...

stackoverflow.com

 

4. Then, git commit -m "whatever you want to leave note"

 

5. And you can input git push origin head

head means push this stuff to the current branch you are in now. So, to prevent any mistake.

 

What does git push origin HEAD mean?

I found, in the official guide: git push origin HEAD A handy way to push the current branch to the same name on the remote. However, the meaning of the command is not clear to me. Why does it hav...

stackoverflow.com

 

6. Once this is done, back to your github repository webpage. 

Right there, look at the menu and find 'pull request'.

That is 'merge request'. In fact, once you done step 4, you will see pull request like message to encourage you to press that green button from the branch you pushed a moment ago.

 

Pull Request vs. Merge Request: Definition, Differences, Benefits, and More | Simplilearn

This article explores the Git pull request, and the Git merge request tools and what they are. We will help you get the most out of your Git experience. Click here.

www.simplilearn.com

7. Press that pull request, and make that request...the only thing you can pay attention is: to where? it would probably be set to default or main branch. Just be careful about it. And that's all I can comment about it for this step.

 

Then probably the people in your project may review and give permission to merge it to their specific branch.

 

Useful URL:

 

TIL | 저장소, 브랜치에 git push하기

git push

velog.io

 

0 Comments
댓글쓰기 폼