- JQuery
$(document).ready(function(){alert( "ready!" ); });
In bash, you can repeat all arguments from the previous command using:
!* - Gets all arguments from the previous commandfind . -name "edu-*.json" -exec bash -c 'mv "$1" "${1/edu-/edu-sea-}"' _ {} \;
rename all edu-* into edu-sea-*
http://127.0.0.1:9200/_cat/indices
ssh -T git@192.168.0.444 (list remote git projects)
git clone git@192.168.0.444:leg/testgitlab.git
(sort of check-out, but copy all the history of all the files)
cd testgitlab/
vi 2.txt
git add 2.txt ("stage" the file)
git commit -m " new file "
(local commit, commit everything that is "staged" into the local git repository)
git reset --hard HEAD^
git push -f
- git revert e52b3378f42c82720c41e7dc08ae211c56ef164d
- (or "git revert HEAD" if only last commit)
- git push
- if I want to revert to a commit that was a merge
- git revert -m 1 6b90123523c78ecc5a63e88b4a8605a530e80e56
git checkout -- JavaTVServiceXlet.java...
or to restore all the files that are have been deleted, you could do:
git ls-files -z --deleted | xargs -0 -n 1 git checkout --
git reset --hard origin/mybranch
2572 git clone git@192.168.0.44:/leg/leg/search-l
2577 git branch
2548 git branch dev_local
2549 git branch
2550 git checkout dev_local
----------- I do my dev and others commit too on the central repo
2556 git status
2557 git commit -a -m"." (you have to commit everything here, otherwise see Dev scenario 2)
2558 git status
2559 git checkout master
2560 git pull
2561 git checkout dev_local
2562 git merge master dev_local
2563 git checkout master
2564 git merge dev_local master
2565 git push
2776 git commit your stuff2776 git stash2776 git branch tmp22777 git checkout tmp2
2781 git cherry-pick 96c53838ba55b72ef16d31f1076393de03c2e0e1 (possibly with option -m 1)
2789 git checkout master
2790 git merge tmp2
2793 git pull
2794 git push
2795 git branch -D tmp2
git checkout release
git branch my_branch release
git push origin my_branch (my_branch points to release)
git checkout my_branch
git add myfile.txt
git commit ...
git push origin my_branch (the commits is shown as head, ahead of master)
git rebase and git pull --rebase, 'ours' and 'theirs' may appear swapped; --ours gives the version from the branch the changes are rebased onto, while --theirs gives the version from the branch that holds your work that is being rebased.lee@MacBook-Pro:~/dev$ git config --global diff.tool bc
lee@MacBook-Pro:~/dev$ git config --global difftool.bc.cmd 'bcomp "$LOCAL" "$REMOTE"'
lee@MacBook-Pro:~/dev$ git difftool master mybranch
C-a :) and then enter the command sessionname SESSIONNAME-rename window: (C-a A)-renumber window: (C-a :) and then "number XXX" (warning: not bigger than the existing max)