Git Concepts:
Git and SVN are version control management, the difference is that SVN is centralized management, if the SVN server down, the entire development of SVN-based version management will not be done; git is distributed management, there is a repository on the local client, there is a repository on the server, and if the GIT servers are not on the line, Developers can also build on the local repository and then synchronize the version to the wire.
SVN common operations: Update, Commit
Git common operations: Fetch, pull (equivalent to crawl + merge, equivalent to SVN update), commit (commit to the local repository), push (equivalent to SVN's commit)
Client common software: Sourcetree, Tortoisegit
git features
Developing iOS under Mac involves pbxproj merging issues, and git has a better way to handle it.
. gitattributes (Version control merge file operations) file contents
*.pbxproj text-crlf-diff-merge=union
. Gitignore (Version control ignores file settings) file contents
*.xccheckout
*.xcuserstate
*.xcscheme
*.xcbkptlist
Xcschememanagement.plist
git service-side operations:
First, the user to form a stand
Build User: Useradd git
Set user password: passwd git
Build User: Useradd test1
Set User password: passwd test1
User group settings: usermod–g git test1
Cd/home/git
mkdir PRJ
Cd..
sudo chmod–r 777 prj
Second, build git repository location in git repository
1. Initialize git init or git–bare init
2, set the Ignore operation:
git config receive.denycurrentbranchignore
3, the operation is optional (git file mode)
Git configcore.filemode True
Gitconfig Core.filemode False
4. File permissions issues (No in-depth study)
Since the git configuration is in SSH mode, it will involve the corresponding permission authentication of SSH, and the user group permission control of Linux system.
Encounter this kind of problem
Often use the following command to process
sudo chmod g+w-r. git/objects
sudo chmod g+w-r objects
sudo chmod g+w-r. git/logs
sudo chmod g+w-r logs
the following settings can be used to resolve file permissions issues, file permissions by git management, which is shared with members within a group
Git configcore.sharedrepository Group
5, Git version control of the branch merger problem is not in-depth study
6, special scenes, such as the GIT server installed in the virtual machine, involving the server IP address change problem
Modify the IP address using the following command:
cd/etc/sysconfig/network-scripts/
VI Ifctg-eth0
Device=eth0
Hwaddr=00:0c:29:1c:96:ad
Type=ethernet
uuid=6c24deea-f920-4f86-bc5e-9f57bd972403
Onboot=yes
Nm_controlled=yes
Bootproto=static
ipaddr=192.168.90.235
netmask=255.255.255.0
gateway=192.168.90.1
dns1=192.168.90.1
Defroute=yes
Service Network restart
Service Iptables Stop
git operation settings