开发者

Configuration - Committing/pushing a single directory to github

开发者 https://www.devze.com 2023-04-11 18:31 出处:网络
I have a working repository setup at github.com I want to push an entire directory to the server (not the sub-directories).How can I do this with out selecting each file individually?

I have a working repository setup at github.com

I want to push an entire directory to the server (not the sub-directories). How can I do this with out selecting each file individually?

I am working with in a single folder...when I am complete I'm not sur开发者_开发百科e which files I've modified...the directory is relatively small so I just want to simply commit and push everything in the quickest way possible.

How do I do this?

How do I commit and push all files in a directory?


git commit -am "Commit message" will add all the files that have changed to the index, and then commit them. It won't do anything with files that are not currently being tracked.

Follow it up with git push <githubRepo> and it will push all those changes.


the fast way is to make an alias for:

git add -A && git commit

The -A will add any modifications including new files added. The -a on commit will NOT include new files.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号