You clone someone else fork and wants to push in your fork
I created a fork (let’s call it
myrepo) of another repository (let’s call it
orirepo) on GitHub. Later, I cloned
git clone https://github.com/original/orirepo.git
I modified about 20 files, then I staged my change and made a commit
However, when I tried to push
I got this error:
remote: Permission to original/orirepo.git denied to mylogin.
fatal: unable to access 'https://github.com/original/orirepo.git/': The requested URL returned error: 403
By default, when you clone a repository
- the local config of the resulting clone lists only one remote called
origin, which is associated with the URL of the repository you cloned;
- the local
master branch in your clone is set to track
Therefore, if you don’t modify the config of your clone, Git interprets
git push origin master:origin/master
In other words,
git push attempts to push your local
master branch to the
master branch that resides on the remote repository (known by your clone as
origin). However, you’re not allowed to do that, because you don’t have write access to that remote repository.
You need to
- either redefine the
origin remote to be associated with your fork, by running
git remote set-url origin https://github.com/RemiB/myrepo.git
- or, if you want to preserve the original definition of the
origin remote, define a new remote (called
myrepo, here) that is associated to your fork:
git remote add myrepo https://github.com/RemiB/myrepo.git
Then you should be able to push your local
master branch to your fork by running
git push myrepo master
And if you want to tell Git that
git push should push to
myrepo instead of
origin from now on, you should run
git push -u myrepo master
To squash the last 3 commits into one:
git reset --soft HEAD~3
git commit -m "New message for the combined commit"
Pushing the squashed commit
If the commits have been pushed to the remote:
git push origin +name-of-branch
The plus sign forces the remote branch to accept your rewritten history, otherwise you will end up with divergent branches
If the commits have NOT yet been pushed to the remote:
git push origin name-of-branch
Loopback is a very power api development framework on node.js. It allows you to build your entire api system with live api documentation ( swagger ) in a very fast and secure way. I finished this course and exposed few apis for some of my clients project.
Investing time and efforts is worth in this. Go for it.
This certificate above verifies that Aseem Jain successfully completed the course Node.js : Rest Apis Development Using Loopback on April 27, 2018 as taught by Haider Malik on Udemy. The certificate indicates the entire course was completed as validated by the student.
Essentially, data driven testing is when we test the same behavior multiple times with different parameters and assertions. A classic example of this would be testing a mathematical operation such as squaring a number. Depending on the various permutations of operands, the result will be different. In Java, the term we may be more familiar with is parameterized testing.
Below lines works wonder using maven, creates web app structure and pull all dependencies.
mvn archetype:generate -DarchetypeGroupId=org.glassfish.jersey.archetypes -DarchetypeArtifactId=jersey-quickstart-webapp -DarchetypeVersionId=2.16
I use sdk man to maintain multiple versions of Groovy, Java, Scala. It makes switching very easy.
SDKMAN! is a tool for managing parallel versions of multiple Software Development Kits on most Unix based systems. It provides a convenient Command Line Interface (CLI) and API for installing, switching, removing and listing Candidates. Formerly known as GVM the Groovy enVironment Manager, it was inspired by the very useful RVM and rbenv tools, used at large by the Ruby community.
Installing SDKMAN! on UNIX-like platforms is as easy as ever. SDKMAN! installs smoothly on Mac OSX, Linux, Cygwin, Solaris and FreeBSD. We also support Bash and ZSH shells.
Simply open a new terminal and enter:
$ curl -s "https://get.sdkman.io" | bash
Follow the instructions on-screen to complete installation.
Next, open a new terminal or enter:
$ source "$HOME/.sdkman/bin/sdkman-init.sh"
Lastly, run the following code snippet to ensure that installation succeeded:
$ sdk version
If all went well, the version should be displayed. Something like: