git operations
When using Git to get oschina Android client source code encountered a problem, found no branch found (only see master)
Later found that there is only one branch, the rest are tag (tag). (on GitHub is generally a branch, here I take for granted to get branches, the result is nothing to see, but the readme clearly said there are many versions, the results found that this resource only a master, the inside is an empty, the code is all in each tag. )
About tag and branch understanding: tag is like a milestone in the software development process (or understood as a point), branch is a new branch; tag is static, branch to go forward, constantly updated; stable version backup with tag, New feature development with branch (merge to Master after development is completed).
The tag is often used in SVN, and each milestone specified in the General project development schedule needs to be published in the appropriate version (for testing by testers or for other purposes).
First create a local directory "Open_source_app" to store the project files
Go to the folder and execute
zf_chan@zf_chan_e440 mingw32/d/demo/android App Source/open_source_app (master)
$ git clone https:// Git.oschina.net/oschina/android-app.git
cloning into ' Android-app '
... Remote:counting objects:36658, done.
Remote:compressing objects:100% (9792/9792), done.
Remote:total 36658 (Delta 23230), reused 35982 (Delta 22682)
receiving objects:100% (36658/36658), 32.13 MiB | 1.64 MIB/S, done.
Resolving deltas:100% (23230/23230), done.
Checking connectivity ... done.
Then go to the "Android-app" folder and execute the git branch-a command to see all the branches (local and remote)
zf_chan@zf_chan_e440 mingw32/d/demo/android App Source/open_source_app/android-app (master)
$ git branch-a
* Master
remotes/origin/head-Origin/master
remotes/origin/master
Execute the git tag-l command to see all tags (tag)
zf_chan@zf_chan_e440 mingw32/d/demo/android App Source/open_source_app/android-app (master)
$ git tag-l
V1.6.2_beta
v1.7.0
v1.7.1_beta1
v1.7.1_beta2
v1.7.2
v1.7.3
v1.7.4
v1.7.7
v1.7.7.1
v2.2
v2.2.1
v2.3
v2.4
v2.6.2
v2.6.3
v2.6.4
Use git show <tag_name> to see more details about the specified tag
zf_chan@zf_chan_e440 mingw32/d/demo/android App Source/open_source_app/android-app (master)
$ git show v2.2.1
Commit e5f67022c82a4d84e65b8f8e95328a4d9afe4e9d
Author: Fire ant <fireant.me@gmail.com>
Date: Mon may 16:12:09 +0800
Post details Recovery report function
diff--git A/ Osc-android-app/src/net/oschina/app/fragment/postdetailfragment.java b/osc-android-app/src/net/oschina/app/ Fragment/postdetailfragment.java
index 6991783..E5901E0 100644
---a/osc-android-app/src/net/oschina/app/ Fragment/postdetailfragment.java
+ + + B/osc-android-app/src/net/oschina/app/fragment/postdetailfragment.java
@@ -71,6 +71,12 @@ -71,6 class Postdetailfragment extends Basedetailfragment implements
initviews (view); C12/>return view;
}
+
+ @Override
+public void Onresume () {
+super.onresume ();
+ ((detailactivity) getactivity ()). Toolfragment.showreportbutton ();
+}
private void Initviews (view view) {
memptylayout = (emptylayout) View.findviewbyid (r.id.error_layout);
Get the tag to execute again
zf_chan@zf_chan_e440 mingw32/d/demo/android App Source/open_source_app/android-app (master) $ Git fetch origin tag v2.2.1