-
wipe out all uncommitted changes that made:
git checkout .
-
But it will not wipe out new files that were not committed yet. to remove all uncommitted changes including newly created files:
version: 0.1 | |
log: | |
fields: | |
service: registry | |
storage: | |
cache: | |
blobdescriptor: inmemory | |
filesystem: | |
rootdirectory: /var/lib/registry | |
http: |
@RunWith(MockitoJUnitRunner.class) | |
public class TokenAuthenticationFilterTest { | |
private static final String token = "260bce87-6be9-4897-add7-b3b675952538"; | |
private static final String testUri = "/testUri"; | |
@Mock | |
private SecurityService securityService; | |
@InjectMocks |
/* | |
** When a spring boot project need to build as war | |
*/ | |
apply plugin: 'war' | |
war { | |
baseName = 'myapp' | |
version = '0.5.0' | |
} |
require 'date' | |
require 'java-properties' | |
def psystem(command) | |
puts command | |
# system command | |
end | |
def tag_head(version) |
##################### | |
## git release | |
##################### | |
# merge feature | |
function fmerge() { | |
branch=`git rev-parse --abbrev-ref HEAD` | |
echo "git pull" | |
echo "git pull origin $1" | |
echo "git push origin $branch" |
ai = add --interactive | |
amend = commit --amend | |
assume = update-index --assume-unchanged | |
assumeall = !git st -s | awk {'print $2'} | xargs git assume | |
assumed = !git ls-files -v | grep ^h | cut -c 3- | |
br = branch | |
bra = branch -ra | |
branch = branch -ra | |
ca = commit --amend | |
caa = commit -a --amend -C HEAD |
To delete all local branches that are already merged into the currently checked out branch:
git branch --merged | grep -v "\*" | grep -v master | grep -v develop | xargs -n 1 git branch -d
To delete all branches on remote that are already merged:
git branch -r --merged | grep -v master | sed 's/origin\///' | xargs -n 1 git push --delete origin
task buildInfo { | |
def cmd = "git rev-parse --short HEAD" | |
def proc = cmd.execute() | |
ext.revision = proc.text.trim() | |
ext.timestamp = (int)(new Date().getTime()/1000) | |
} |
package com.hello.app; | |
import com.squareup.okhttp.MediaType; | |
import com.squareup.okhttp.MultipartBuilder; | |
import com.squareup.okhttp.RequestBody; | |
import com.squareup.okhttp.ResponseBody; | |
import retrofit.Call; | |
import retrofit.GsonConverterFactory; | |
import retrofit.Response; | |
import retrofit.Retrofit; |