Skip to content

Commit 0d47717

Browse files
authored
feat: modify default branch to gh-pages (#6)
* fix: home page cann't show custom branch commit * feat: v0.0.2 upload to gh-pages
1 parent 620532f commit 0d47717

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cmd/root.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ var rootCmd = &cobra.Command{
4343
// 1. checkout branch
4444
s, _ := os.Stat(".git/refs/heads/" + branch)
4545
if s != nil {
46-
fmt.Println(branch + " 分支已存在")
46+
fmt.Println(branch + " 分支已存在,切换分支")
4747
RunCommand("git", "checkout", branch)
4848
} else {
49-
fmt.Println(branch + " 分支不存在, 新建分支")
49+
fmt.Println(branch + " 分支不存在新建分支")
5050
RunCommand("git", "checkout", "-b", branch)
5151
}
5252
// 2. for each
@@ -108,7 +108,7 @@ func Execute() {
108108
}
109109

110110
func init() {
111-
rootCmd.Flags().IntVarP(&year, "year", "y", 2022, "generate year")
111+
//rootCmd.Flags().IntVarP(&year, "year", "y", 2022, "generate year")
112112
rootCmd.Flags().BoolP("open", "o", false, "Open home page")
113113
rootCmd.Flags().BoolP("push", "p", false, "Push remote repository")
114114
}

cmd/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var versionCmd = &cobra.Command{
1717
}
1818

1919
func printGitGreenVersion() {
20-
fmt.Println("git-green version v0.0.1")
20+
fmt.Println("git-green version v0.0.2")
2121
}
2222

2323
func init() {

0 commit comments

Comments
 (0)