Skip to content

Instantly share code, notes, and snippets.

View sermoud's full-sized avatar

Milton Sermoud sermoud

View GitHub Profile
@Hylke1982
Hylke1982 / FirstLetterOfWordCapital.java
Created February 17, 2015 11:45
Method to make first letter of a word capital
public String firstLetterCapitalWithSingleSpace(final String words) {
return Stream.of(words.trim().split("\\s"))
.filter(word -> word.length() > 0)
.map(word -> word.substring(0, 1).toUpperCase() + word.substring(1))
.collect(Collectors.joining(" "));
}
$ cd myproject
$ git checkout myBranch
$ git push -u origin myBranch
# In some cases -u showed as invalid argument, so use this
$ git push origin <local name>