Update push to gitlab all file in Terminal
Swift 4 use terminal upladet GItlab
in terminal type like below
cd <--- exit folder
paste your folder data to terminal /Users/admin/yourapp
git init
git remote add origin http://fox.BlaBla.com/example/dadad.git
git add .
git commit -m "Initial commit"
git remote -v git push -u origin master
note:
git log //for look log, press q to exit lo git status git commit -m "Initial commit" git push -u origin master
if error use this syntac:
If the GitHub repo has seen new commits pushed to it, while you were working locally, I would advise using:
git pull --rebase
git push
The full syntax is:
git pull --rebase origin master
git push origin master
That way, you would replay (the
--rebase
part) your local commits on top of the newly updated origin/master
(or origin/yourBranch
: git pull origin yourBranch
).
See a more complete example in the chapter 6 Pull with rebase of the Git Pocket Book.
I would recommend a:
git push -u origin master
That would establish a tracking relationship between your local master branch and its upstream branch.
After that, any future push for that branch can be done with a simple:
After that, any future push for that branch can be done with a simple:
git push
Since the OP already reset and redone its commit on top of
origin/master
:git reset --mixed origin/master
git add .
git commit -m "This is a new commit for what I originally planned to be amended"
git push origin master
There is no need to
pull --rebase
.
Note:
git reset --mixed origin/master
can also be written git reset origin/master
, since the --mixed
option is the default one when using git reset
.or can use this.
UseFull, recomended
git init
git add -A
git commit -m 'Added my project'
git remote add origin git@github.com:scotch-io/my-new-project.git
git push -u -f origin master
No comments: