Git Revert: When your already committed BooBoo Code to repo and need to get HEAD back to HAPPY

silosix@M6500:~/git/cmsauto$ git revert 7b55a41
On branch feature/pom_to_pombase
Your branch is up to date with 'origin/feature/pom_to_pombase'.

nothing to commit, working tree clean
silosix@M6500:~/git/cmsauto$ get reset --hard 7b55a41 && git clean -f

Command 'get' not found, but there are 18 similar ones.

silosix@M6500:~/git/cmsauto$ git reset --hard 7b55a41 && git clean -f
HEAD is now at 7b55a41 file cleanup
silosix@M6500:~/git/cmsauto$ git revert 7b55a41
[feature/pom_to_pombase 088dbb9] Revert "file cleanup"
 1 file changed, 4 insertions(+), 5 deletions(-)
silosix@M6500:~/git/cmsauto$ git push -f
Password for 'https://unityconstruct@bitbucket.org':
Counting objects: 10, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (10/10), 746 bytes | 746.00 KiB/s, done.
Total 10 (delta 4), reused 0 (delta 0)
remote:
remote: Create pull request for feature/pom_to_pombase:
remote:   https://bitbucket.org/unitycon
Tags

Maven: Creating first project from archetype via CLI

 

setting maven in PATH

PATH=$PATH:/usr/lib/maven/apache-maven-3.6.1/bin

mvn Command to Generate from Archetypes

mvn -B archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=com.uc.app -DartifactId=uc-app

 

Tags

Bash: Changing Owner of a folder

 

If you want to change the user owning this file or directory (folder), you will have to use the command chown. For instance, if you run

sudo chown username: myfolder

the user owning myfolder will be username. Then you can execute

sudo chmod u+w myfolder

to add the write permission to the username user.

But if you want to add this user to the group associated with "myfolder", you can run

sudo usermod -a -G groupname username

and then execute

sudo chmod g+w myfolder

to add the write permission to the group.

Tags
Subscribe to