問題描述:
1、我在gitlab中創建了一個空的倉庫。
2、然後我在本地創建了一個空的文件夾,使之與我剛剛創建的gitlab倉庫關聯,用如下命令關聯:
$mkdir test_file
$cd test_file
$git init
$git remote add origin http://........(gitlab倉庫地址)
3、將文件夾與gitlab倉庫關聯後,我開始創建自己的文件,並提交到Git倉庫
$touch test.txt
$git add test.txt
$git commit -m "commit test.txt"
$git push -u origin master
(在出現的提示中,輸入用戶名和密碼)
4、在運行完這條命令後,終端提示推送成功,但是gitlab倉庫頁面卻看不到提交的文件
5、多方查找後,發現運行下面這條命令後,gitlab倉庫頁面能夠顯示提交的文件了
$gitlab-rake cache:clear RAILS_ENV=production