2017-06-24 5 views
2

スクリプト内のパスをコミットしないようにするgitコードを探しています。私はMacとPCを頻繁に切り替えて、ローカルに保存されているデータを処理します。異なるディレクトリを使用するため、システムを切り替えるとパスを変更する必要があります。私は使用しようとしましたスクリプトのコミットパスをスキップします

git rm -r --cached <dir> 

しかし、パスはまだコミットされています。この場合、gitignoreを使用する必要がありますか?

ありがとうございます!私はMac用の.gitignore用のテンプレートを使用する。この場合

+0

あなたはスクリプトファイル内のパスを意味しますか? – VonC

+0

@VonCはい、そうです。 – Kay

答えて

0

# General 
*.DS_Store 
.AppleDouble 
.LSOverride 

# Icon must end with two \r 
Icon 


# Thumbnails 
._* 

# Files that might appear in the root of a volume 
.DocumentRevisions-V100 
.fseventsd 
.Spotlight-V100 
.TemporaryItems 
.Trashes 
.VolumeIcon.icns 
.com.apple.timemachine.donotpresent 

# Directories potentially created on remote AFP share 
.AppleDB 
.AppleDesktop 
Network Trash Folder 
Temporary Items 
.apdisk 

あなたがここに便利なテンプレートをたくさん見つけることができます。

https://github.com/github/gitignore/blob/master/Global/macOS.gitignore

関連する問題