N
N
Neuro2019-06-19 12:59:26
git
Neuro, 2019-06-19 12:59:26

How to remove files from a remote branch on gitlab?

I created a branch and made a commit and pushed it to the server, but this commit also included files that I didn’t need to change, can I somehow fix this and remove these files from the previous commit?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vitsliputsli, 2019-06-19
@Vitsliputsli

Make a soft reset of the branch to the previous commit, edit and re-submit to the server via force push. Something like this:
git reset --soft 6836a4d3c9e5f1d29edc33fe758a95604819c249
git checkout Your_File
git commit
git push -f
But the branch must not be protected on the server, otherwise the force push will not work, in this case create a new commit.

M
Maxim Timofeev, 2017-08-10
@webinar

In your view imageFiles[], this is an array, and in the validation rules, this is 1 file.
Try:
www.yiiframework.com/doc-2.0/yii-validators-eachva...

D
DragonChris, 2017-08-10
@DragonChris

You have var_dump($image) returned, and there shouldn't be anything there. $imageUpload->upload() returns true or false. The files are probably already saved, if you need to get their name try $image = $imageUpload->imageFiles->name;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question