26 septembrie 2019

Notite MVN, Git, etc

Maven
> mvn clean install -rf :parent -DskipTests


Git MERGE
> git status
> git checkout <branch-de-unde-aduci-date>
> git pull
> git checkout <task care face merge>
> git merge <branch-de-unde-aduci-date>
> git status

Daca sunt conflicte: GO & solve conflicts in IDE
> git commit
(:wq in Vim to save commit default message)
> IDE: add & commit as normal
> git push

Commit de pe branch-ul meu pe unul gresit:
> git commit --amend
(edit file with correct branch code)
> git push

Sterge toate modificarile necomise inca:
> git add .
> git stash
> git stash drop

Arata codul ultimului commit (nu neaparat pushed):
> git log --format="%H" -n 1

Pe un branch nou aplica un commit:
> git cherry-pick <commit-id>
> git push


GIT Bash: find text in all files:
> grep -rnw '/path/to/somewhere/' -e 'pattern'


IDE Hotswap agent
-XXaltjvm=dcevm -javaagent:C:\Program Files\Java\hotswap-agent.jar YourApp

Run in debug mode, check hotswap are init in the logs
Reload:
1) Run -> Reload changed classes
2) Build -> Recompile...
3) App: refresh step


Altele
If pinging PC does not work:
> ipconfig /flushdns
(cached IP has changed)

Niciun comentariu: