How to push a part of the warehouse to the branch

how do I push the contents of a part of the warehouse or under a folder to the warehouse branch?

Git
Mar.21,2022

git add path
git commit
git push


only stage, and commit this part of the content. Refer to stackoverflow: https://stackoverflow.com/que.


if you are not familiar with the git command, it is recommended to install an official GitHub client, which is quick and easy to use. Like your question, what documents you want to submit, just check submit.

clipboard.png


if it is a file that is not in the same directory, add the files one by one, and then commit them.

git add path/to/file
git commit-m 'x'
git push origin branch

if it is a directory, go directly to the add directory
git add path/to/dir

the second option, you can add a file or folder directly using git tools such as source tree, or git, included with vscode

Menu