Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Github with .gitignore ignore specified file     - Sorting Algorithm (1) Quick Sort C ++ implementation (Programming)

- Linux settings Java_home (Linux)

- Linux environment variable configuration (Linux)

- Installation and configuration to compile MySQL 5.6.10 under CentOS 5.9 (Database)

- RHEL7 Apache MPM configuration (Server)

- VirtualBox snapshots (Linux)

- Use ldap implement Windows Remote Desktop Ubuntu Linux (Linux)

- C ++ Supplements - malloc free and new delete the same and different (Programming)

- Graphing tool: Gnuplot (Linux)

- Binary search is really easy as you think you do (Programming)

- How to create an alternative Android / iOS connected wireless hotspot AP in Ubuntu 15.04 (Linux)

- Linux SU command security Suggestions (Linux)

- Linux environment password security settings (Linux)

- Security matters and practical Linux System (Linux)

- Kibana Apache Password Authentication (Server)

- How to manage and use Logical Volume Management LVM in Ubuntu (Linux)

- Zombie process under Linux (Linux)

- Linux virtual memory and physical memory (Linux)

- Fedora 20 Installation and Configuration (Linux)

- Can not empty the Recycle Bin to repair problems in Ubuntu 14.04 (Linux)

  Github with .gitignore ignore specified file
  Add Date : 2017-04-13      

Github .gitignore provide this functionality, you can specify which files they can not be managed. The specific method is in the root directory of version management (with the same level .git folder) to create a .gitignore.


The project has three clist.h clist.c main.c file, compiler implementation, generate three files clist.o main.o main. These three documents is that no version management, it is necessary to ignore these files, use git stauts view, we found these three documents also state in Untracked files. And we really do want to ignore him.

Use gitignore file to solve this problem, the steps are:

S1: touch .gitignore # Create gitignore hidden files
S2: vim .gitignore # Edit the file, add the specified file
         # The following is the content of my gitignore file
         # Ignore gitignore file
         # Ignore the file name suffix .o and .a's
         *. [Oa]
         # Display the name of the main file is ignored
.gitignore File format specification:

# Is a comment
You can use the shell used regular expressions for pattern matching
Last match mode with the "/" directory is described to be ignored
use! Negated (such as a directory contains test.a, and gitignore file contains *. [Oa], if added to the file! Test.a show ignore suffixes other than test.a file named .a or .o files )
After configuring .gitignore file, execute git status command, you will find three files that are no longer Untracked files, and also completed the function ignores the specified file.
- Use PuTTY key authentication mechanism for remote login Linux (Linux)
- MongoDB version 3.2 WiredTiger storage engine performance tests (Database)
- Linux System Getting Started Learning: the curl set custom HTTP header (Linux)
- How to install or upgrade to the Linux kernel in Ubuntu 4.2 (Linux)
- Linux port mapping system (routing and forwarding) (Server)
- Android memory optimization of the memory cache (Linux)
- CentOS7 set boot directly into the command line interface (Linux)
- Linux RAID Set RAID 10 or 0 + 1 (Linux)
- Macro Analysis Performance: PHP Performance Analysis and Experiment (Programming)
- AWK principles and commands and file input (Linux)
- Linux environment to build next Cocos2dx-3.3.1 (Linux)
- Java generate two-dimensional code by Zxing (Programming)
- PXE install CentOS 6.4 (Linux)
- How to Install Redis server on CentOS 7 (Server)
- build Android environment on Ubuntu 12.04 (Server)
- Android development environment to build under Fedora 13 (Linux)
- PL / SQL data types (Database)
- Linux kernel modules related to the management Comments (Linux)
- Three methods easy data encryption on Linux (Linux)
- Installation Android IDE development tools, Android Studio 1.5 under Ubuntu (Linux)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.