-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgit_rebase
59 lines (37 loc) · 2.09 KB
/
git_rebase
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Interactive rebase off of a point earlier in the history than the commit you need to modify (git rebase -i <earliercommit>). In the list of commits being rebased, change the text from pick to edit next to the hash of the one you want to modify. Then when git prompts you to change the commit, use this:
git commit --amend --author="Author Name <[email protected]>"
Specify git rebase -i B
change the lines for both C and D to edit
Once the rebase started, it would first pause at C
You would git commit --amend --author="Author Name <[email protected]>"
Then git rebase --continue
It would pause again at D
Then you would git commit --amend --author="Author Name <[email protected]>" again
git rebase --continue
The rebase would complete.
git commit --amend --author="Author Name <[email protected]>"
######################################################
reseting the head.
git reset --hard HEAD~1
this is remove the last commit from the workspace and will deete the commit.
To push the changes to the repo use -f switch. this will rewrite the history in the workspace.
GITHUB: jenkins file sample:
https://github.com/UNINETT/nav/blob/master/Jenkinsfile
to revert any presvious commit in git
git revert --strategy resolve <commit> (this will create a new Commit ID with the history maintained in the commit.. )
#############################################
how to change the date of a particular commit
##############################################
1. Rebase to the point where you want to change the commit history
git rebase -i HEAD~5
change the prefix of the commit as edit or e
2. git commit --amend --date="Thu, 24 Oct 2018 013:00:56 +0000"
3. run " git rebase --continue" until you complete the rebase.
########################
https://github.com/jenkinsci/generic-webhook-trigger-plugin/blob/master/src/test/resources/org/jenkinsci/plugins/gwt/bdd/bitbucket-server/bitbucket-server-pull-request.feature
pull requests from the commits in bitbuckets.
#########################
enable guest add on in virtual box.
sudo apt-get install virtualbox-guest-x11
sudo VBoxClient --clipboard
#########################