Bitbucket

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

Git info command for Git SSL Errors

git config --system --list

 

w:\w\git\behatphpfacebook (feature/webdriver-pom -> origin)
λ git config --system --list
core.symlinks=false
core.autocrlf=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
pack.packsizelimit=2g
help.format=html
http.sslcainfo=/ssl/certs/ca-bundle.crt
diff.astextplain.textconv=astextplain
rebase.autosquash=true
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
credential.helper=manager
Tags

BitBucket: Reverting a commit before a push

Actually, when you use git reset, you should refer to the commit that you are resetting to; so you would want the db0c078 commit, probably.

An easier version would be git reset --hard HEAD^, to reset to the previous commit before the current head; that way you don't have to be copying around commit IDs.

Beware when you do any git reset --hard, as you can lose any uncommitted changes you have. You might want to check git status to make sure your working copy is clean, or that you do want to blow away any changes that are there.

Tags

Git Branching*

 

  • this string worked for re-configuring my remote repo in eclipse...
  • .. need to look into the specs on this
  • ..my repo wasn't fetching new branches so I might have created a new branch that wasn't in the remote repo & things got off track
+refs/heads/*:refs/remotes/origin/*

 

 

Create branch & add file

Create branch phase0

git branch phase0

git checkout phase0

add file phase0.txt

git commit -m "message"

git push origin phase0

 

Checkout Master branch & add file

git checkout master

add master-phase0.txt

commit

push

 

 

Checkout Phase0 branch & update file

change phase0.txt

git commit  -m "message"

git push origin phase0

 

 

 

 

 

 

 

 

 

 

 

Tags

Git Quick Start ( Bitbucket )

Create BitBucket Repo

Repository View

Clone Repo Button & Modal

 

Create a batch file to simplify git operations.

I prefer to leave path settings alone & manage in environment settings in startup scripts

Tags
Subscribe to Bitbucket