我创建了一个新的存储库:
git init
echo "# MESSAGE" >> README.md
git add README.md
git commit -m "first commit"
Run Code Online (Sandbox Code Playgroud)
然后我想将我的提交推送到在github上创建的空远程存储库,所以我必须设置远程.
使用以下命令有什么区别?:
git remote add origin git@github.com:User/UserRepo.git
git remote set-url origin git@github.com:User/UserRepo.git
Run Code Online (Sandbox Code Playgroud)
最后我执行推送:
git push -u origin master
Run Code Online (Sandbox Code Playgroud)
EDIT1:
当我在git init之后调用remote set-url origin时会发生什么?远程set-url origin是否创建了origin?如果在git init之后已经存在origin,那么在我的场景中使用这些命令没有区别,对吧?
什么是什么WeakHashMap时候应该使用它?a WeakHashMap和a 之间有什么区别HashMap?
我有多个条件要检查,如下所示,
if(pouch.getStatus().equals("Finalized") || pouch.getStatus().equals("Ready")
|| pouch.getStatus().equals("Checkout") || pouch.getStatus().equals("Confirmed")
|| pouch.getStatus().equals("Book") || pouch.getStatus().equals("Started")
|| pouch.getStatus().equals("Inital") || pouch.getStatus().equals("Close")) {
// Body
}
Run Code Online (Sandbox Code Playgroud)
是否有任何简单的方法来检查类似SQL IN条件的上述条件,以便代码看起来更简单?
因此,在我的 .vimrc 文件中,我将制表符设置为 2 个空格。我知道 Makefile 不喜欢这样,我一直在做的是暂时删除我拥有的 .vimrc 条件并编辑 Makefile,然后将所有内容添加回 .vimrc 文件。有什么方法可以在 Makefile 上使用 vim 编辑它,而不必进行所有更改?我的 Makefile 非常简单。就像下面这样
all: main.cpp
g++ -g -Wall main.cpp
Run Code Online (Sandbox Code Playgroud)
这是我的 .vimrc
set number
colorscheme ron
set expandtab
: filetype on
: syntax on
: filetype indent on
set tabstop=2
set shiftwidth=2
Run Code Online (Sandbox Code Playgroud) collections ×2
java ×2
conditional ×1
git ×1
github ×1
hashset ×1
linux ×1
makefile ×1
unix ×1
vim ×1
weakhashmap ×1
where-in ×1