git版本控制管理实践-3

git -m 和git -a -m(-am) . 的区别?

usally two steps to commit files to respository:
first, git add somefiles/dir;
second, git commit -m 'commit log messages'
but, the two steps above can be executed as one action: git -am commit somefiles/dir.
that is to say, if there are not new files to be tracted, 'git -am commit' will add those modified files to index and commit them.

Both 'dnf' and 'git' and 'systemctl' are applications, they are followed by commands. Their formats are similar: git/dnf/systemctl list-unit/start some-service [options] command [...]. So, in normal case, options are put'git/dnf' back, not behind 'command'.
In command "dnf list",the list works like command 'ls'.
The command 'Systemctl' works like 'control panel' in Windows OS. It does some work about system controls, such as service management.

remote repository has two forms: project development with working tree and only for codes share in team development.

the former is called remote developing repos, and the latter is named bare codes-share repos. developing repos are often cloned by git client. bare codes share repos are only used to share codes in most cases, which do not include working directory. (in most cases: for verb. adv. , but 'for the most part', describes noun.)

Remote Repos Management

Sometimes, a cloned git repos is named ***.git, but the repo is a directory actually.
In general, 'repo' refers the directory which includes '.git'. And repo is named ***.git for easy recognition.

A repo may be cloned into an existing specified local directory, but this is only allowed when the directory is empty. Repo is cloned into a newly created directory whose name is same as the remote one by default, so, a local directory will have to be written explictly. The command perhaps looks like this: git clone repo-urls

In general, URLs contain information about the transport protocol, the address of the remote server, and the path to the repository.


Scp and Ssh

Scp: secure cp (for file trans-mission between a remote network host and a local host). Referenced article's address: http://www.cnblogs.com/ilikeballs/p/5113349.html. The usage of Scp is almost same as cp, so it is easy.

If the transport protocol is ssh When cloning a remote repo, the remote repo info may be alternatively applied scp-like syntax.

About transport protocol:

  • Only git and ssh support ~username expansion. '~' is the current user's home directory. '~username' can also be used to refer the specified user's home directory.

  • Ssh protocol is also allowed to use scp-like syntax. That is, ssh protocal 'ssh://' can be omitted.

  • For local repositories, use the form like this '/path/to/repo.git' or like this 'file:///path/to/repo.git'

The three syntax alternatives(adj. n. 可替换的事物)above are showed in the following figure:

  • comma is ',' colon is ':' semicolon is ';' period is '.'

Usually, the suffix['s^fiks] '-d' indicates that program is a deamon, such as httpd, sshd. Oppositely, no '-d' suffix shows that program is a client application, such as ssh. Further more, daemon command files reside in directory "/usr/sbin/", client command files reside in directory "/usr/bin/ .

mariadb-server is a client-server implementation consisting of(using active voice not passive voice) a mariadb server(mysqld) and other relative files, such as many different client programs and libraries.

'epoch': ['ip2k], 时代, 纪元...

In English, there is no bookname brackets, that expresses in italic font. In American English, quotes are double-quotes, however, in England English, quotes are single-quotes. Of course, both single quote and double quote are used at the same time.


How to resolve the error: "cann't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'(2 no such file or directory) "

The command 'dnf install mariadb-server' will introduce the following packets into your computer:

The two configures above show that after installing "mariadb-server", the directory '/usr/lib/' has 'mysql' sub-directory.

In Fedora 23, service daemon files, such as httpd, sshd, mysqld etc do not reside in the directory "/etc/rc.d/init.d/, but are put in the path: /usr/lib/systemd/...(-d shows that this is daemon about system)

The content in the [square brackets] is named 'group'

Readline is a cross-platform open-source gnu library. It is mostly used in command line programs in linux and other unix-like OS.

To check mysql/mariadb version, use command "status" or "selecct version() as ver" after login/connect to sql server.
In sql server, execute "system (or \!) + shell-command" to run system command.


How to create a remote repo for cloning?

**git repository is indeed directory "/some/path/to/working-dir/.git" **

After add a remote repository, the file .git/config is appended [remote]group:

To git remote push local master branch to remote origin repo, make sure that the sshd service has been started and is running.

posted @ 2016-11-02 15:09  noitanym  阅读(253)  评论(0编辑  收藏  举报