博客园测试第二篇

Git 实践

本文为测试markdown效果,无其他用途。

1、克隆远程仓库

zhangy@Liuying-PC MINGW64 ~
$ git clone http://gitlab.cqrd.com/yingliu/efront.git
Cloning into 'efront'...
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
Checking connectivity... done.

2、查看状态

zhangy@Liuying-PC MINGW64 ~
$ cd efront

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean

3、创建文件夹及文件

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ mkdir git

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ cd git

zhangy@Liuying-PC MINGW64 ~/efront/git (master)
$ vi git.basic.md

4、再次查看状态

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ ll
total 1
drwxr-xr-x 1 zhangy 197121 0 四月 10 07:35 git/
-rw-r--r-- 1 zhangy 197121 8 四月 10 07:26 README.md

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
  (use "git add <file>..." to include in what will be committed)

       git/

nothing added to commit but untracked files present (use "git add" to track)

5、将文件添加到git暂存区,以便git跟踪

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ git add git

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        new file:   git/git.basic.md

6、提交文件到本地仓库

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ git commit -m "add files"
[master 2f7bbbb] add files
 1 file changed, 9 insertions(+)
 create mode 100644 git/git.basic.md

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)
nothing to commit, working directory clean

7、推送文件到远程仓库

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ git push --set-upstream origin master
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 496 bytes | 0 bytes/s, done.
Total 4 (delta 0), reused 0 (delta 0)
To http://gitlab.cqrd.com/yingliu/efront.git
   4faf842..2f7bbbb  master -> master
Branch master set up to track remote branch master from origin.

8、查看历史

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ git log
commit 2f7bbbb2dfafcb48df366f3c6bb9d37d92469e5f
Author: liuying <yingliu@travelsky.com>
Date:   Mon Apr 10 15:41:48 2017 +0800

    add files

commit 4faf842df2ece6619714a0b8ba23c539f8107254
Author: liuying <090854dummy@test.com>
Date:   Wed Mar 8 14:50:33 2017 +0800

    efront拉

9、从远程仓库抓取数据

zhangy@Liuying-PC MINGW64 ~
$ cd efront

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ git pull
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From http://gitlab.cqrd.com/yingliu/efront
   2f7bbbb..f49aa28  master     -> origin/master
Updating 2f7bbbb..f49aa28
Fast-forward
 git/README.md | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 git/README.md
zhangy@Liuying-PC MINGW64 ~/efront (master)
$ ls git
    git.basic.md  README.md

10、在本地git目录下修改一个文件

    在本地git目录下修改 README.md,增加的内容是: git diff HEAD

11、查看工作空间与本地库之间的差异

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ git diff HEAD
diff --git a/git/README.md b/git/README.md
index bddc158..d851a31 100644
--- a/git/README.md
+++ b/git/README.md
@@ -1 +1 @@
-git pull
\ No newline at end of file
+git diff HEAD
\ No newline at end of file

12、将修改的文件添加到暂存区,以便跟踪

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   git/README.md

no changes added to commit (use "git add" and/or "git commit -a")

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ git add -A

13、查看暂存区与本地库之间的差异

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ git diff --staged
diff --git a/git/README.md b/git/README.md
index bddc158..d851a31 100644
--- a/git/README.md
+++ b/git/README.md
@@ -1 +1 @@
-git pull
\ No newline at end of file
+git diff HEAD
\ No newline at end of file

14、重置暂存区中的文件

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ git reset git/README.md
Unstaged changes after reset:
M       git/README.md

15、将工作区的文件还原到修改之前

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   git/README.md

no changes added to commit (use "git add" and/or "git commit -a")

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ git checkout -- git/README.md

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean

16、创建并切换分支

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ git branch dev

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ git checkout dev
Switched to branch 'dev'

17、推送新的分支到远程仓库

zhangy@Liuying-PC MINGW64 ~/efront (dev)
$ git push --set-upstream origin dev
Total 0 (delta 0), reused 0 (delta 0)
To http://gitlab.cqrd.com/yingliu/efront.git
 * [new branch]      dev -> dev
Branch dev set up to track remote branch dev from origin.

18、删除当前分支上的文件

zhangy@Liuying-PC MINGW64 ~/efront (dev)
$ git rm '*.md'
rm 'README.md'
rm 'git/README.md'
rm 'git/git.basic.md'

19、提交修改到当前分支

zhangy@Liuying-PC MINGW64 ~/efront (dev)
$ git commit -m "Remove all the cats"
[dev 5b96906] Remove all the cats
 3 files changed, 11 deletions(-)
 delete mode 100644 README.md
 delete mode 100644 git/README.md
 delete mode 100644 git/git.basic.md

20、切换到master分支

zhangy@Liuying-PC MINGW64 ~/efront (dev)
$ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.

21、合并dev分支

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ git merge dev
Updating f49aa28..5b96906
Fast-forward
 README.md        | 1 -
 git/README.md    | 1 -
 git/git.basic.md | 9 ---------
 3 files changed, 11 deletions(-)
 delete mode 100644 README.md
 delete mode 100644 git/README.md
 delete mode 100644 git/git.basic.md

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ ls

22、删除分支

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ git branch -d dev
warning: not deleting branch 'dev' that is not yet merged to
         'refs/remotes/origin/dev', even though it is merged to HEAD.
error: The branch 'dev' is not fully merged.
If you are sure you want to delete it, run 'git branch -D dev'.

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ git branch -D dev
Deleted branch dev (was 5b96906).

23、推送文件到远程仓库

zhangy@Liuying-PC MINGW64 ~/efront (master)
$ git push
Counting objects: 2, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1/1), done.
Writing objects: 100% (2/2), 200 bytes | 0 bytes/s, done.
Total 2 (delta 0), reused 0 (delta 0)
To http://gitlab.cqrd.com/yingliu/efront.git
   f49aa28..5b96906  master -> master

转载于:https://www.cnblogs.com/LYLYLY/p/6689910.html

AAC(Advanced Audio Coding)是一种音频数据压缩格式,它采用更高效的编码算法,在保留音质的同时减小文件大小。AAC格式广泛用于各种音频播放设备和平台上,如音乐播放器、手机、电视和流媒体服务等。 在测试AAC格式时,我们可以使用不同的音频文件进行试验。首先,我们可以选择一首音频文件,将其转换为AAC格式,并比较转换后的文件大小和音质与原始文件的差异。这可以通过使用各种音频转换工具来完成,例如iTunes。 其次,我们可以测试使用AAC格式的音频在不同设备和平台上的兼容性和播放效果。我们可以尝试在不同的音频播放器和手机上播放AAC格式的音频文件,并评估其播放质量和是否有任何问题。 另外,我们还可以测试AAC格式在网络流媒体传输中的表现。我们可以尝试通过使用不同的流媒体服务,如YouTube或Spotify,以AAC格式传输音频,并评估流畅性、延迟和音质等方面的性能。 最后,在测试AAC格式时,我们还可以比较它与其他音频格式(如MP3、WAV等)之间的差异。我们可以使用相同的音频文件转换为不同格式,并评估它们之间的文件大小、音质和兼容性等方面的差异。 总之,测试AAC格式涉及到对其文件大小、音质、兼容性和流媒体传输性能等方面的评估。这些测试可以帮助我们了解AAC格式的特点和适用性,以便在实际应用中作出合适的选择。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值