简体   繁体   English

Git pull 不会拉取 .gitignore

[英]Git pull does not pull .gitignore

I am using Google VM(linux) to run some codes in my git repository.我正在使用 Google VM(linux) 在我的 git 存储库中运行一些代码。 I manually added a .gitignore file in my repository via web, and then tried to perform "git pull" in my VM.我通过网络在我的存储库中手动添加了一个 .gitignore 文件,然后尝试在我的 VM 中执行“git pull”。 However even though git status shows my branch is up-to-date, the newly added .gitignore file is not pulled or cannot be seen in my VM.然而,即使 git status 显示我的分支是最新的,新添加的 .gitignore 文件也不会被拉取或在我的 VM 中看不到。 What am I doing wrong?我究竟做错了什么?

Thanks for any help!谢谢你的帮助!

在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

I think what you are doing wrong is using plain ls .我认为您做错的是使用普通ls .gitignore is a hidden file. .gitignore是一个隐藏文件。 Try with ls -a and it should show up.尝试使用ls -a它应该会出现。

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

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