問題描述:
1、在gitlab中創(chuàng)建了一個(gè)空的倉庫。
2、然后在本地創(chuàng)建了一個(gè)空的文件夾,使之與剛剛創(chuàng)建的gitlab倉庫關(guān)聯(lián),用如下命令關(guān)聯(lián):
$mkdir test_file
$cd test_file
$git init
$git remote add origin http://........(gitlab倉庫地址)
3、將文件夾與gitlab倉庫關(guān)聯(lián)后,開始創(chuàng)建文件,并提交到Git倉庫
$touch test.txt
$git add test.txt
$git commit -m "commit test.txt"
$git push -u origin master
(在出現(xiàn)的提示中,輸入用戶名和密碼)
4、在運(yùn)行完這條命令后,終端提示推送成功,但是gitlab倉庫頁面卻看不到提交的文件
5、多方查找后,發(fā)現(xiàn)運(yùn)行下面這條命令后,gitlab倉庫頁面能夠顯示提交的文件了
$gitlab-rake cache:clear RAILS_ENV=production
轉(zhuǎn)自:https://blog.csdn.net/u010463613/article/details/84393083