git add -A
git commit -m 'message'
git push origin master
Run Code Online (Sandbox Code Playgroud)
安装 Git 后,我上传了我的第一个文件。
我创建了一个名为“udemy”的根文件夹,并且有子项目的子文件夹。
我想将整个文件夹上传到一个存储库中。但它没有用。
这就是我所做的.. 我该怎么办?提前致谢。
我想将我丑陋的代码改进为更干净和简单的东西。如何缩短此代码?
if (this.foo < 2) {
return (this.result = [ { year: 1 } ]);
}
if (this.foo < 3) {
return (this.result = [ { year: 1 }, { year: 2 } ]);
}
if (this.foo < 4) {
return (this.result = [ { year: 1 }, { year: 2 }, { year: 3 } ]);
}
if (this.foo < 5) {
return (this.result = [ { year: 1 }, { year: 2 }, { year: 3 }, { …Run Code Online (Sandbox Code Playgroud)