Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Always use my; never use local?

Tags:

People also ask

Should I rebase or pull?

It is best practice to always rebase your local commits when you pull before pushing them. As nobody knows your commits yet, nobody will be confused when they are rebased but the additional commit of a merge would be unnecessarily confusing.

What is the use of rebase?

Rebase is one of two Git utilities that specializes in integrating changes from one branch onto another. The other change integration utility is git merge . Merge is always a forward moving change record. Alternatively, rebase has powerful history rewriting features.

Is git pull rebase safe?

If you are working on a 'private branch' (a branch that you never pushed, but only merge or rebase on a public branch, one that you will push), then you are safe to rebase that private branch any time you want. In the end, it all depends on the workflow of merge you have chosen to establish.

What does pull with rebase mean?

Git pull rebase is a method of combining your local unpublished changes with the latest published changes on your remote.


Implementing dynamic scoping, I was using local. Then I came across this post, which says the following:

Why have local at all? The answer is 90% history. Early versions of Perl only had global variables. local was very easy to implement, and was added to Perl 4 as a partial solution to the local variable problem.

...never use local.

Is its use deprecated, or discouraged? If yes, what is the alternative?