Skip to main content
Commonmark migration
Source Link

##Intended usage

Intended usage

##Script

Script

##Intended usage

##Script

Intended usage

Script

deleted 74 characters in body; edited tags; edited title
Source Link
Jamal
  • 34.9k
  • 13
  • 133
  • 237

Shell script to helpassist with branch management for tasks in git

I've read a handful of tutorials on writing shell scripts but found it difficult to find one that emphasized on portability/POSIX compliancy. I'd like the script to run just fine in sh, dash, bash and zsh. Any feedback is appreciated - for one thing, I'm a bit unsure about where to use $variable and ${variable}...

 

Intended usage

##Intended usage

  • Features are merged back into the development branch.
  • Releases are continuously merged back into the development branch (bugfixes) and, once the release branch is considered stable enough (decided upon by the user), merged into master (with a tag), ending the release branch.
  • Hotfixes are merged back into both the master (with a tag) and the development branch.

     

Branch model

Branch model

  • Temporary
  • Branch off from master
  • Merge back into development and master
  • Naming: "x.y.fix", e.g. "1.2.1" (x, y is defined by release, "hotfix/" is prepended)
  • Signed tag needed when merging with master

     

Script

##Script

Shell script to help with branch management for tasks in git

I've read a handful of tutorials on writing shell scripts but found it difficult to find one that emphasized on portability/POSIX compliancy. I'd like the script to run just fine in sh, dash, bash and zsh. Any feedback is appreciated - for one thing, I'm a bit unsure about where to use $variable and ${variable}...

 

Intended usage

  • Features are merged back into the development branch.
  • Releases are continuously merged back into the development branch (bugfixes) and, once the release branch is considered stable enough (decided upon by the user), merged into master (with a tag), ending the release branch.
  • Hotfixes are merged back into both the master (with a tag) and the development branch.

     

Branch model

  • Temporary
  • Branch off from master
  • Merge back into development and master
  • Naming: "x.y.fix", e.g. "1.2.1" (x, y is defined by release, "hotfix/" is prepended)
  • Signed tag needed when merging with master

     

Script

Shell script to assist with branch management for tasks in git

I've read a handful of tutorials on writing shell scripts but found it difficult to find one that emphasized on portability/POSIX compliancy. I'd like the script to run just fine in sh, dash, bash and zsh. Any feedback is appreciated - for one thing, I'm a bit unsure about where to use $variable and ${variable}...

##Intended usage

  • Features are merged back into the development branch.
  • Releases are continuously merged back into the development branch (bugfixes) and, once the release branch is considered stable enough (decided upon by the user), merged into master (with a tag), ending the release branch.
  • Hotfixes are merged back into both the master (with a tag) and the development branch.

Branch model

  • Temporary
  • Branch off from master
  • Merge back into development and master
  • Naming: "x.y.fix", e.g. "1.2.1" (x, y is defined by release, "hotfix/" is prepended)
  • Signed tag needed when merging with master

##Script

added 4 characters in body; edited tags
Source Link
palacsint
  • 29.9k
  • 9
  • 81
  • 156

I've read a handful of tutorials on writing shell scripts but found it difficult to find one that emphasized on portability/POSIX compliancy. I'd like the script to run just fine in sh, dash, bash and zsh. Any feedback is appreciated - for one thing, I'm a bit unsure about where to use $variable$variable and ${variable}${variable}...

I've read a handful of tutorials on writing shell scripts but found it difficult to find one that emphasized on portability/POSIX compliancy. I'd like the script to run just fine in sh, dash, bash and zsh. Any feedback is appreciated - for one thing, I'm a bit unsure about where to use $variable and ${variable}...

I've read a handful of tutorials on writing shell scripts but found it difficult to find one that emphasized on portability/POSIX compliancy. I'd like the script to run just fine in sh, dash, bash and zsh. Any feedback is appreciated - for one thing, I'm a bit unsure about where to use $variable and ${variable}...

Improved formatting, added comment above each while loop to clarify its purpose, added validation of new branch names to only allow for a-z (no uppercase), 0-9 and _ (underscore) characters.
Source Link
totte
  • 81
  • 1
  • 4
Loading
Swapped -z for -n, added check to see if user is in a git repository (sort of crucial...)
Source Link
totte
  • 81
  • 1
  • 4
Loading
Fixed grammar and cut down on excessive code, also switched out the "select" statement due to being a "Bashism" (from what I gathered).
Source Link
totte
  • 81
  • 1
  • 4
Loading
Tweeted twitter.com/#!/StackCodeReview/status/247757239346151424
Added define_tag function
Source Link
totte
  • 81
  • 1
  • 4
Loading
Source Link
totte
  • 81
  • 1
  • 4
Loading