I need to extract a snippet of code in app/views/cgi_testing_seeds/index.html.haml
,
form this commit '77df270', because it should be owned by other commit.
It's very complicated to revert or rollback to that commit '77df270', Then redo all the remaining commits again,
For example If I only want to revert the code of index method
in the CgiTestingSeedsController.rb
,
And add it into the commit 4b733c5
, how to ?
Or extract the code of the method and keep it in staged status, how to ?
What's an easier to do this in Git.
Brief log
4b733c5 - (HEAD, feature/testing_seeds_model) Scaffold:Testing seed and generate testing data via 'faker gem' (7 minutes ago) <poc7667>
2fd8204 - (develop) Merge branch 'hotfix/wrong_column_names_in_CGIparamters' into develop (4 days ago) <poc7667>
052e2ff - Remove 'name' in 'cgi_attributes' and fix wrong name for 'default_value' (4 days ago) <poc7667>
77df270 - Scaffold: CgiTestingSeed (2 days ago) <poc7667>
Changed file in the commit 77df270
77df270 - Scaffold: CgiTestingSeed (2 days ago) <poc7667>
app/assets/javascripts/cgi_testing_seeds.js.coffee
app/controllers/cgi_testing_seeds_controller.rb
app/helpers/cgi_testing_seeds_helper.rb
CgiTestingSeedsController.rb in the commit 77df270
class CgiTestingSeedsController < ApplicationController
before_action :set_cgi_testing_seed, only: [:show, :edit, :update, :destroy]
# GET /cgi_testing_seeds
# GET /cgi_testing_seeds.json
def index
@cgi_testing_seeds = CgiTestingSeed.all
end
# GET /cgi_testing_seeds/1
# GET /cgi_testing_seeds/1.json
def show
end