Как игнорировать определенные файлы в git?

<head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>On click Change Css</title>
    <link rel="stylesheet" href="css/style.css" >
    <script src="js/jquery-1.11.3.min.js" type="text/javascript"></script>
    <script>
        $(document).ready(function(){
            $('.main').click(function(){
                $(this).toggleClass('main1').siblings().removeClass('main1');;
             });
        });
    </script>

</head>

<body>

    <center>
        <div class="main" id="main-box">
            <h2>This is main Heading</h2>
            <p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
            </p>
        </div>
        <div class="main">
            <h2>This is main Heading</h2>
            <p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
            </p>
        </div>
        <div class="main">
            <h2>This is main Heading</h2>
            <p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
            </p>
        </div>
    </center>

</body>

Css

.main {
  width:300px;
  margin:30px;
  margin:20px 25px;
  text-align:center;
  background-color:#CCC;
  padding:20px;
  display:inline-block;
}
.main:hover {
  cursor:pointer;
}
.main1 {
  width:300px;
  margin:30px;
  margin:20px 25px;
  text-align:center;
  background-color:#CCC;
  padding:20px;
  border:3px solid #036;
}
660
задан Charlie Egan 9 February 2015 в 12:38
поделиться

1 ответ

Я попробовал это -

  1. файлы списка, которые мы хотим проигнорировать

git status .idea/xyz.xml .idea/pqr.iml Output .DS_Store

  1. Копия содержание step#1 и добавить его в .gitignore файл.

echo "git status .idea/xyz.xml .idea/pqr.iml Output .DS_Store" >> .gitignore

  1. Проверяют

git status .gitignore

аналогично, мы можем добавить каталог и весь его sub dir/файлы, который мы хотим проигнорировать в состоянии мерзавца с помощью directoryname/*, и я выполнил эту команду от src каталог.

0
ответ дан 22 November 2019 в 21:40
поделиться
Другие вопросы по тегам:

Похожие вопросы: