简体   繁体   English

如何将GitShell的命令转换为.bat文件?

[英]How can I convert GitShell's commands into an .bat file?

I'm on windows 8, I've installed GitHub, and there is also a GitShell. 我在Windows 8上,已经安装了GitHub,并且还有一个GitShell。

I can add files to GitHub in GitShell via using git add... , ... git push , type username, type password 我可以使用git add... ,... git push ,将用户名和密码输入文件添加到GitHub中的GitHub中

But I know little about how to convert it into a .bat file 但是我对如何将其转换为.bat文件知之甚少

How can I use a .bat file to complete the thing which done by commands in GitShell on windows and send files to GitHub? 如何使用.bat文件完成Windows上GitShell中命令执行的操作并将文件发送到GitHub?

在此处输入图片说明

Method on Windows 8.1: Windows 8.1上的方法:

Put the commands set used in GitShell in one .Bat file where the portable GitHub installed. 将用于GitShell的命令集放在一个安装了可移植GitHub的.Bat文件中。

Run the .bat file, you will upload a "GitHub.nb" into the GitHub, you can use a program to generate the .bat files, I use Mathematica to do such things. 运行.bat文件,您将上传一个“ GitHub.nb”到GitHub中,您可以使用一个程序来生成.bat文件,我使用Mathematica来做这样的事情。

And you should type the username and password, you can download a assistant described in my Linked full-version to not do such things. 而且您应该输入用户名和密码,然后可以下载“我的链接的完整版本”中描述的助手,以免执行此类操作。

cd /d documents\github\hypergroups.github.com

git add"GitHub.nb"
git commit -a -m "something"
git push

pause

Full version is here 完整版本在这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM